Security-first review
Verified
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.
- Security threat model: name threats before the design hardens.
- Security best practices: the baseline pass on the change.
- Ask questions if underspecified: stop and ask; do not invent auth.
- 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 and static-analysis 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, ask-questions-if-underspecified,
insecure-defaults, static-analysis, 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 --skill differential-review --skill insecure-defaults --skill static-analysis --skill ask-questions-if-underspecified
Requires Node.js 18+.
npx skills add openai/skills --skill security-threat-model --skill security-best-practices
Requires Node.js 18+.
npx skills add getsentry/skills --skill code-review
Requires Node.js 18+.
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
- Ask Questions If Underspecified : Prompt for clarification on ambiguous requirements
- Code Review : Perform code reviews