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.
npx agentmods add rules/yudefine/nuxt-supabase-starter/security-policygit clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starterWrote 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/yudefine/nuxt-supabase-starter/security-policy)<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/security-policy"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/security-policy.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.00000 | $0.00875 |
| Opus 5 | $0.00000 | $0.00438 |
| Sonnet 5 | $0.00000 | $0.00175 |
| Haiku 4.5 | $0.00000 | $0.00088 |
Grade A, and why
security-policy 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 2d ago.
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.
What it actually says
Security policy(SECURITY.md 安全憲法)
SECURITY.md 是這個 repo 安全不變量的 SoT。Codex Security 掃描($CLADE_HOME/scripts/security-scan.ts)在 target 有它時自動當 --knowledge-base 餵入;沒有它,掃描只看語法——程式碼裡的「刪除專案」是漏了授權還是正常功能,只有憲法答得出來。
五段固定結構(REQUIRED,順序固定)
| 段 | 寫什麼 | 從哪裡盤點 |
|---|---|---|
## 攻擊入口 |
對外可達的 API / route 分群,含每一個未認證入口(token 連結、webhook、公開表單、kiosk / 裝置端點)逐條列 | server/api/**、server/routes/** |
## 信任邊界 |
請求在哪一層從「外部」變「可信」:middleware 名稱、session 型態、service-role client 准用的範圍 | server/middleware/** |
## 身分與授權模型 |
第一行明寫 user-owned 或 tenant-scoped;每層 enforcer(RLS / middleware / handler)各負責什麼 |
schema 的擁有者欄位 + RLS policy |
## 核心資產與 secret |
最值錢的資料表,加上所有 secret 的 key 名(NEVER 寫值) | .env.example |
## 安全不變量 |
每條格式 - INV-n: <NEVER 句> — enforced by: rls|middleware|handler|storage|queue |
前四段推出 |
不變量 MUST ≥ 5 條,每一條都要有 enforced by——沒有執行層的不變量,掃描器找不到反面證據,只能報候選、報不了 finding。
條件句
- 這個 repo 沒有
SECURITY.md→ 先從$CLADE_HOME/vendor/snippets/security-policy/的範本(user-owned或tenant-scoped)建一份,再動 Tier 3 路徑 SECURITY.md的任一條不變量改了 → 上一次security-scan.ts baseline即過期(audit 以 ledger 的security_md_sha判),下一次 Tier 3 commit 前重跑- 掃描報告的每一條 finding → 先走
security-evidence finding(Severity / Confidence / Coverage / Proof Gap)判讀,再登 TD;wrapper 只掃不修
精簡
每段只寫掃描器判斷需要的事實:範例、教學、逐 endpoint 的 handler 描述都不放——它是 --knowledge-base,每個字都進 prompt。
機械稽核:node $CLADE_HOME/scripts/audit-security-policy.ts --consumers <path>。成因與文章論證:docs/rule-rationale/security-policy.md。
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.
- 2d ago First seen · 41 lines · 0 tokens per session scan A d51920724280
security-policy is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 875 tokens. 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-03.
Other cursor rules, from other repositories
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.