Borrowing it
Nothing to install: this file belongs to Bugb-Technologies/guardlink. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Bugb-Technologies/guardlink/main/.windsurfrulesgit clone --depth 1 https://github.com/Bugb-Technologies/guardlinkWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/bugb-technologies/guardlink/windsurfrules)<a href="https://agentmods.dev/rules/bugb-technologies/guardlink/windsurfrules"><img src="https://agentmods.dev/badge/rules/bugb-technologies/guardlink/windsurfrules.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02616 | $0.02616 |
| Opus 5 | $0.01308 | $0.01308 |
| Sonnet 5 | $0.00523 | $0.00523 |
| Haiku 4.5 | $0.00262 | $0.00262 |
Grade A, and why
windsurfrules 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GuardLink Security Annotations
This project carries a GuardLink threat model.
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.
Core Requirement
Every time you write or modify code that touches security-relevant behavior, you MUST add GuardLink annotations in the same change. This includes: new endpoints, auth logic, data validation, database queries, file I/O, external API calls, crypto, process spawning, user input handling, config 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.
Key Rules
- ANNOTATE NEW CODE. When you add a function or endpoint that handles user input, accesses data, or crosses a trust boundary — add @exposes, @mitigates, @flows, @handles, or at minimum @comment. This is not optional.
- NEVER write @accepts — that is a human-only governance decision. For risks with no mitigation: write @exposes + @audit + @comment suggesting potential controls.
- NEVER write @entitles either — propose it with
guardlink entitle --proposeand a human's acceptance writes it, under their name. It claims a privilege is supposed to have this effect, so an over-grant closes a real escalation as by-design. Cite the authz code as file:line or the claim is inert. Never propose one for an ownership question (IDOR, tenant isolation). - Use @confirmed for verified exploits. When pentest/scanning/manual reproduction proves a threat is exploitable: @confirmed #threat on Asset [severity] -- "evidence". Distinct from @exposes (theoretical) — @confirmed means real, verified, no false positives. Without evidence in hand, @exposes stands and you do not promote it — reading the code is not reproduction. To get evidence:
bugb intake "<brief>"builds a plan an operator approves, never you. - Preserve existing annotations — do not delete or mangle them.
- Definitions (@asset, @threat, @control with (#id)) live in .guardlink/definitions.ts. Reuse IDs — never redefine. Add new definitions there first, then reference in source files.
- Source files use relationship verbs: @mitigates, @exposes, @confirmed, @flows, @handles, @boundary, @comment, @validates, @audit, @owns, @assumes, @transfers, @feature. (@actor is a definition — it lives with @asset/@threat/@control. @entitles is proposed, not written.)
- Triggers for the four verbs everyone forgets: wrote a test that pins a control → @validates #control for Asset. Code trusts a caller/library/platform to hold a property it never checks → @assumes Asset -- "what must hold". A threat becomes a vendor's or another team's responsibility → @transfers #threat from Source to Target (both ends must be declared assets; a vendor needs an External.* asset first). You know the accountable team → @owns team-id for Asset (bare token — no quotes, no #).
- Write coupled annotation blocks: risk + control (or audit) + data flow + context note — plus @boundary when that flow crosses a trust change, and @handles when the asset touches classified data.
- Avoid @shield unless a human explicitly asks to hide code from AI.
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.
- today First seen · 133 lines · 2,616 tokens per session scan A 7703ed7d81b6
windsurfrules is a cursor rule published in the GitHub repository Bugb-Technologies/guardlink (19 stars, last pushed yesterday), licensed MIT. It adds 2,616 tokens to every session, about $0.0131 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-09-06.
Other cursor rules, from other repositories
data-poisoning
AI/LLM data poisoning threat agent — detects training data manipulation, RAG index poisoning, knowledge base corruption, fine-tuning supply chain attacks, and context window contamination against Data Stores and Data Flows.
model-theft
AI/LLM model theft threat agent — detects model weight exfiltration, API-based model extraction, artifact exposure, side-channel reconstruction, fine-tuned model theft, and supply chain compromise against Data Stores and Processes.
prompt-injection
AI/LLM prompt injection threat agent — detects direct and indirect prompt injection, jailbreak, system prompt extraction, and cross-plugin injection threats against LLM-integrated Processes.
006_Program_of_Thought_Tutorial
DSPY 3 Program of Thought Tutorial - Production code reasoning system from official DSPy 3.0.1 tutorial.
standards-data-eng
Mandatory standards for Python and SQL data pipelines.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.