guardlink copilot-instructions.md

Project instructions for GuardLink, a security model that records threats, data flows, protections, and accepted risks next to the code.

In plain words
What is it for?
Use them when editing files, changing shared components, investigating security scanner findings, or validating a completed change.
Why use it?
They provide security context that may not be visible from source code alone and help assess how changes affect other components and trust boundaries.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/bugb-technologies/guardlink/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/Bugb-Technologies/guardlink

Made for: GitHub Copilot.

Per session 3,997 This file is loaded in full into every session.
When invoked 3,997 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03997 $0.03997
Opus 5 $0.01998 $0.01998
Sonnet 5 $0.00799 $0.00799
Haiku 4.5 $0.00400 $0.00400

Measured yesterday against content hash 446367699428, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

guardlink copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

.github/copilot-instructions.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

This project carries a GuardLink threat model: security facts recorded next to the code they describe — what each component is exposed to, what mitigates it, how data flows between components — parsed into something you can query.

Ask it instead of inferring security context from the source. It already answers most of what you would otherwise guess at, and it records decisions that are invisible in the code, such as which risks a human has explicitly accepted.

You are about to… Ask
edit a file guardlink_context(file) — annotations there, the assets they name, open exposures, controls the file must uphold
change a shared component guardlink_graph(from, depth, direction) — blast radius across data flows and trust boundaries
act on a scanner finding guardlink_lookup("cwe:CWE-89") — is this weakness class declared, and is it mitigated, accepted, open or confirmed
finish a change guardlink validate . then guardlink diff HEAD~1 — did I make this worse

Without MCP, the same answers come from guardlink status ., guardlink parse . (the whole model as JSON on stdout) and guardlink diff HEAD~1.

Full reference: docs/GUARDLINK_REFERENCE.md

Where annotations go

Annotation mode: inline. Annotations live in source-file comments, in the comment syntax of the file you are editing — the doc-block of the function or module they describe.

/**
 * @exposes #api to #sqli [critical] cwe:CWE-89 -- "email concatenated into SQL"
 * @mitigates #api against #sqli using #prepared-stmts -- "parameterized via pg"
 */
export function login(email: string) { … }

Do not create .gal sidecars under .guardlink/annotations/ in this mode; a repo with both is a mixed repo, and that is the failure this section exists to prevent.

What you owe it back

When you write or change code that touches security-relevant behavior, add the annotations in the same change. This includes: new endpoints, authentication/authorization logic, data validation, database queries, file I/O, external API calls, crypto operations, process spawning, user input handling, and configuration parsing. Do NOT annotate code that never touches a security boundary — formatters, UI components, pure helpers. Business logic that makes an authorization or ownership decision is in scope: an IDOR or a missing tenant check lives in business logic, not in the parsing layer.

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 190 lines · 3,997 tokens per session scan A 446367699428

Subscribe to this mod's changes

guardlink copilot-instructions.md is an instructions file published in the GitHub repository Bugb-Technologies/guardlink (19 stars, last pushed 6d ago), licensed MIT. It adds 3,997 tokens to every session, about $0.0200 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.