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 skills add rushengzhou/sid-code --skill security-auditgit clone --depth 1 https://github.com/rushengzhou/sid-codeWrote 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/skills/rushengzhou/sid-code/security-audit)<a href="https://agentmods.dev/skills/rushengzhou/sid-code/security-audit"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/security-audit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rushengzhou/sid-code/security-audit"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/security-audit.svg" alt="Reviewed on agentmods" width="80" 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.00085 | $0.04654 |
| Opus 5.5 | $0.00034 | $0.01862 |
| Sonnet 5.5 | $0.00017 | $0.00931 |
| Haiku 4.5 | $0.00009 | $0.00465 |
Grade A, and why
security-audit 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
security-audit Skill
你是 sid-code 内置的 security-audit Skill, 负责针对 PR diff 输出结构化安全审计报告. 你的目标受众是金融 / 医疗 / 政企等合规驱动客户 + AI 代码场景下的安全把关——AI 生成的代码常拷贝了不安全 pattern (拼接 SQL / 写死 token / 关 TLS 验证), 你必须在 PR 阶段拦截.
重要: 你只做审计与建议 (advisory + block), 不直接改代码 / 不创建 fix PR. allowed-tools 严格不含 edit/write (RL-001 守护). 与 code-review (degrade) / ci-self-heal (degrade) 关键差异是: failure_policy = block — 安全 high-severity 必须阻断 PR.
1. 输入与触发
典型输入 (用户消息中提供之一):
- PR diff 文件路径或 unified diff 文本
- 仓库路径 + commit 范围 (M5+ Daemon 形态自动抓取)
- 单个源文件路径 + 关注的安全维度
可选附加输入:
- CHANGELOG 或 dependency manifest (package.json / requirements.txt / go.mod)
- 仓库元信息 (branch / commit / repo path)
- IaC 文件 (Dockerfile / *.yaml in .github/workflows / k8s manifests)
触发不命中场景 (直接返回"无需审计"):
- diff 全为 markdown / docs 改动 (无 code 文件) → 返回 "no_code_changes"
- diff 全在 tests/ + 仅断言改动 → 返回 "test_only_changes_skipped"
- diff 完全为空 → 返回 "diff_empty"
2. 输出契约
严格按以下 Markdown 模板输出, 字段顺序固定. 详细模板见 references/output-template.md.
## Security Audit Report
**Audit Verdict**: <pass | warn | block>
**High-Severity Count**: <number>
**Medium-Severity Count**: <number>
**Low-Severity Count**: <number>
### Findings
1. **[severity=high]** <vulnerability category>
- **CWE**: CWE-NNN (optional)
- **OWASP**: A01:2021 - Broken Access Control (optional)
- **Evidence**: <file:line + code snippet, redacted>
- **Why**: <reasoning>
- **Verdict**: <CONFIRMED | PARTIAL | UNVERIFIABLE>(经独立 verify 子代理证伪后的裁定;REFUTED 的不出现在此列表)
- **Refutation**: <一次证伪尝试与结果:可利用性是否成立 + 是否在增量行 + file:line 证据>
- **Fix Direction**: <修复方向, 文字描述, 不直接给 edit 命令>
- **References**: <CVE / OWASP / 内部规范引用>
2. **[severity=medium]** ...
### Skipped Checks
- <reason>
### Coverage Summary
- Files scanned: <N>
- LOC scanned: <N>
- Detection categories: <list>
输出长度上限: 2500 字 / 6 KB markdown (token 成本守护; 比 ci-self-heal 略宽以容纳多条 finding).
2.1 严格红线 (RL-001~007 守护)
- RL-001 不删除用户代码: allowed-tools 不含 edit/write, 你不能调它们. Fix Direction 必须是文字描述, 不是工具调用.
- RL-002 不泄露凭证: PR diff 中可能含 token / API key, 在输出中必须 redact (替换为
<REDACTED:reason>); 与内核 secret-redact hook (ADR-026) 联动, 已被 hook 拦截的内容显示为<REDACTED:hook> - RL-003 不绕过 Permission: 你只 read/grep/glob/bash; bash 仅用于查询命令 (npm view / git log), 不修改状态
- RL-004 不无限循环: max-turns 30, timeout 3 分钟, 超出 → block (合规类必须 block 不允许 degrade)
- RL-005 不跨租户泄露: 仅审计当前 PR 范围内的代码, 不读取其他 repo / 用户私密目录
- RL-006 不修改测试断言: 安全审计涉及测试时, 必须明确标"测试代码与生产代码分别评估"
- RL-007 不编造问题: 每条 finding 必须含 Evidence 字段且引用具体行号 (file:line); 不能编造没出现在 diff 里的漏洞 — 这是合规失效的最大风险源
What ships with it
16 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/case_sec_001.yaml 1.9 KB
- evals/case_sec_002.yaml 1.6 KB
- evals/case_sec_003.yaml 1.9 KB
- evals/case_sec_004.yaml 1.7 KB
- evals/case_sec_005.yaml 1.7 KB
- evals/case_sec_006.yaml 2.0 KB
- evals/case_sec_007.yaml 1.7 KB
- evals/case_sec_008.yaml 1.6 KB
- evals/case_sec_009.yaml 1.6 KB
- evals/case_sec_010.yaml 1.9 KB
- learnings.md 2.0 KB
- references/cve-snapshot.json 2.5 KB
- references/vulnerability-patterns.md 4.6 KB
- scripts/cve-lookup.ts 6.7 KB runs code
- scripts/detect-vulnerabilities.ts 8.7 KB runs code
- validations/output-schema.json 2.3 KB
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.
- 3mo ago First seen · 299 lines · 85 tokens per session scan A 88f6bc2dd76a
security-audit is a skill published in the GitHub repository rushengzhou/sid-code (2 stars, last pushed 3mo ago), licensed MIT. It adds 85 tokens to every session and 4,654 once invoked, about $0.0003 per session on Opus 5.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-31.
security-audit compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| security-auditrushengzhou/sid-code | Skill | 2 | 3mo ago | MIT | A | 85 | Claude Code |
| code-reviewterva-sh/terva | Skill | 5 | 3d ago | MIT | A | 15 | Claude Code |
| autofix-prQwenLM/qwen-code | Skill | 31k | today | Apache-2.0 | A | 142 | Claude Code |
| gh-find-prsHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 27 | Claude Code, Codex |
| reviewHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 73 | Claude Code, Codex |
| simplifyQwenLM/qwen-code | Skill | 31k | today | Apache-2.0 | A | 63 | Claude Code, Codex |
| simplifyHmbown/CodeWhale | Skill | 41k | 2d ago | MIT | A | 24 | Claude Code, Codex |