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 skills/programmeranthony/expert-coding-harness/code-security-auditnpx skills add ProgrammerAnthony/Expert-Coding-Harness --skill code-security-auditgit clone --depth 1 https://github.com/ProgrammerAnthony/Expert-Coding-HarnessWhat 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 | $0.00128 | $0.03036 |
| Opus 5 | $0.00064 | $0.01518 |
| Sonnet 5 | $0.00026 | $0.00607 |
| Haiku 4.5 | $0.00013 | $0.00304 |
Grade A, and why
code-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 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.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
代码安全审计专家
铁律:所有漏洞发现必须有代码路径证据。 禁止基于"典型框架通常有此漏洞"等假设报告漏洞,未找到完整调用链的必须标记为"疑似,需人工验证"。
Inputs / Outputs / Gates / Handoffs(统一契约)
- Inputs(最小输入):目标仓库/目录;技术栈线索(语言/框架/运行方式);审计范围(模块/commit/接口);扫描模式(Quick/Standard/Deep)。
- Outputs(产物形态):审计计划(先)+ 结构化审计报告(后,结构参考
references/audit-report-template.md)。 - Gates(继续前必须满足):
- 未经用户确认范围与模式,禁止开始扫描分析(保持与本文件 HARD-GATE 一致)。
- 结论必须有代码路径证据链(Source→Sink);不完整链路必须标为“疑似,需人工验证”。
- 通用门控清单可复制使用:
references/quality-gates-checklist.md。
- Handoffs(推荐下游):
writing-plans(实施计划编写):输出修复计划subagent-driven-development(子代理驱动开发):按计划执行修复code-security-audit(代码安全审计专家):修复后复审
审计方法:三层分析法
| 层次 | 方法 | 目标 |
|---|---|---|
| 面 | Grep / 模式匹配 | 快速定位高风险区域,识别危险函数调用 |
| 线 | Read / 逐行追踪 | 完整数据流追踪,Source → Sink 路径分析 |
| 点 | 推理 / 逻辑验证 | 确认漏洞有效性、防护可绕过性、利用条件 |
扫描模式
启动时询问用户选择模式(默认 Standard):
请选择扫描模式:
1. Quick(快速扫描,约 5-10 分钟)— 高危漏洞 + 敏感信息 + 已知 CVE
2. Standard(标准扫描,约 30-60 分钟)— OWASP Top 10 + 认证授权 + 加密
3. Deep(深度扫描,约 1-3 小时)— 全维度覆盖 + 攻击链 + 业务逻辑 + 合规
10 个安全维度 + 三轨模型
| # | 维度 | 审计轨道 | 覆盖内容 |
|---|---|---|---|
| D1 | 注入 | Sink-driven | SQL/Cmd/LDAP/SSTI/SpEL/JNDI |
| D2 | 认证 | Config-driven | Token/Session/JWT/Filter 链 |
| D3 | 授权 | Control-driven | CRUD 权限一致性、IDOR、水平越权 |
| D4 | 反序列化 | Sink-driven | Java/Python/PHP Gadget 链 |
| D5 | 文件操作 | Sink-driven | 上传/下载/路径遍历 |
| D6 | SSRF | Sink-driven | URL 注入、协议限制 |
| D7 | 加密 | Config-driven | 密钥管理、加密模式、KDF |
| D8 | 配置 | Config-driven | Actuator、CORS、错误信息暴露 |
| D9 | 业务逻辑 | Control-driven | 竞态条件、Mass Assignment、状态机、多租户隔离 |
| D10 | 供应链 | Config-driven | 依赖 CVE、版本检查 |
五阶段审计流程
Phase 1:侦察与架构建模(约 10% 工时)
目标:建立项目全貌,产出架构图和攻击面清单。
# 技术栈识别
ls -la
find . -name "package.json" -o -name "pom.xml" -o -name "requirements.txt" -o -name "go.mod" | head -20
# 入口点识别
rg "router|app.route|@RequestMapping|@Controller|@RestController" -l
# 配置文件识别
find . -name "*.yml" -o -name "*.yaml" -o -name "*.properties" -o -name "*.env" | head -20
# 敏感信息预扫
rg -i "password|secret|api_key|token|private_key" -l
What ships with it
33 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.
- README.md 2.7 KB
- references/audit-report-template.md 1.7 KB
- references/checklists/architecture-level-checklist.md 9.5 KB
- references/checklists/code-level-checklist.md 21 KB
- references/checklists/coverage-matrix.md 3.0 KB
- references/compliance/compliance-frameworks.md 3.2 KB
- references/devsecops-best-practices.md 6.6 KB
- references/examples/audit-examples.md 11 KB
- references/examples/config-file-vulnerabilities.md 17 KB
- references/examples/detailed-vulnerability-chains.md 34 KB
- references/examples/environment-simulation.md 8.8 KB
- references/examples/vulnerability-analysis.md 150 KB
- references/examples/vulnerability-cases.md 13 KB
- references/knowledge/anti-hallucination.md 2.3 KB
- references/knowledge/architecture-analysis.md 8.2 KB
- references/knowledge/attack-chain-analysis.md 7.8 KB
- references/knowledge/data-flow-analysis.md 6.6 KB
- references/knowledge/dependency-analysis.md 4.2 KB
- references/knowledge/pattern-scanning.md 12 KB
- references/knowledge/phase2-deep-methodology.md 14 KB
- references/knowledge/reporting.md 6.1 KB
- references/knowledge/secret-detection.md 5.4 KB
- references/knowledge/security-controls-matrix.yaml 3.3 KB
- references/knowledge/taint-analysis-enhanced.md 3.5 KB
- references/knowledge/vulnerability-validation.md 7.4 KB
- references/quality-gates-checklist.md 836 B
- references/rules/command-injection-rules.md 5.0 KB
- references/rules/sql-injection-rules.md 4.3 KB
- references/templates/architecture-diagram-templates.md 7.6 KB
- references/templates/report-template.md 14 KB
- references/templates/reproduction-steps-template.md 8.2 KB
- references/tools/security-tools.md 12 KB
- references/wooyun/wooyun-cases.md 36 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.
- 2d ago First seen · 228 lines · 128 tokens per session scan A d98d2b80f5dd
code-security-audit is a skill published in the GitHub repository ProgrammerAnthony/Expert-Coding-Harness (234 stars, last pushed 3mo ago), licensed MIT. It adds 128 tokens to every session and 3,036 once invoked, about $0.0006 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…