Security-first review
Verified against Claude Code 2.1.273, Codex CLI 0.154.0 · Updated
Agent-written code fails in boring ways: default secrets, open CORS, a threat model that never got written. I want those questions asked before the feature exists, and again on the diff.
Who it is for
Anyone reviewing agent-written diffs. Security-sensitive services, or a team that got burned once.
What this combination solves
Name the threats. Reject a vague spec. Hunt insecure defaults. Review the diff for security, not style. Run static analysis. Then a second, general review so the security pass is not the only set of eyes.
Skills
- Differential review: security review of the diff, where agents introduce bugs.
- Insecure defaults: default credentials, weak crypto, tutorial copy-paste.
- Static analysis: CodeQL, Semgrep, SARIF parsing. The CLI lists those as
codeql,semgrep, andsarif-parsing. - Security threat model: name threats before the design hardens.
- Security best practices: the baseline pass on the change.
- Code review: a second pass that is not only security.
AGENTS.md starter
# AGENTS.md
Security-sensitive repo. Read this first.
## Hard rules
1. If auth, money, or personal data is in scope, write a threat model first.
2. If the spec is thin, ask. Do not invent a permission model.
3. Run insecure-defaults, then CodeQL or Semgrep, on the diff.
4. Review with differential-review, then code-review.
5. No default secrets, no `CHANGE_ME`, no `password123` in fixtures
that ship.
## Skills
security-threat-model, insecure-defaults,
codeql, semgrep, sarif-parsing, differential-review,
security-best-practices, code-review.
Verification hook
Treat a Semgrep or CodeQL finding as a failed session, same as a red test. See Verification loops.
Install
One command per source repo. --skill picks names. -a claude-code, -a cursor, or -a codex targets one agent. Flags checked against the skills CLI README. npx skills add trailofbits/skills --list does not list insecure-defaults or ask-questions-if-underspecified. Trail of Bits ships insecure-defaults as a plugin: /plugin marketplace add trailofbits/skills then /plugin install insecure-defaults in Claude Code, or codex plugin marketplace add trailofbits/skills then codex plugin add insecure-defaults@trailofbits in Codex.
npx skills add trailofbits/skills --skill differential-review --skill codeql --skill semgrep --skill sarif-parsing
Requires Node.js 22.20+.
npx skills add openai/skills --skill security-threat-model --skill security-best-practices
Requires Node.js 22.20+.
npx skills add getsentry/skills --skill code-review
Requires Node.js 22.20+.
Skills in this kit
- Differential Review : Security-focused diff review with git history analysis
- Insecure Defaults : Detect insecure default configurations like hardcoded secrets, default credentials, and weak crypto
- Static Analysis : Static analysis toolkit with CodeQL, Semgrep, and SARIF
- Security Threat Model : Generate repo-specific threat models identifying trust boundaries
- Security Best Practices : Review code for language-specific security vulnerabilities
- Code Review : Perform code reviews