security-review

A command that reviews code for security problems, including exposed secrets, unsafe dependencies, weak authentication, unchecked input, and risky settings.

In plain words
What is it for?
Use it to review a change, scan the whole project, or focus on secrets, dependencies, or configuration.
Why use it?
It helps find common security mistakes in recent changes or across a full codebase before they reach production. It also suggests fixes with code examples.

Command

Install

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.

agentmods
npx agentmods add commands/paulduvall/ai-development-patterns/security-review
Clone the repo
git clone --depth 1 https://github.com/PaulDuvall/ai-development-patterns
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,089 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.01089
Opus 5 $0.00005 $0.00544
Sonnet 5 $0.00002 $0.00218
Haiku 4.5 $0.00001 $0.00109

Measured 2d ago against content hash 008adc8bc088, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

security-review 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.

examples/custom-commands/commands/security-review.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Review

You are helping a developer identify security vulnerabilities in code changes. Perform multi-layer security analysis covering secrets, dependencies, authentication, input validation, and configuration security. Provide actionable remediation with specific code examples.

Usage

/security-review              # Review recent changes
/security-review --full       # Full codebase scan
/security-review --secrets    # Focus on secret detection
/security-review --deps       # Focus on dependencies
/security-review --config     # Focus on configuration

Implementation

1. Secret Detection

Scan for hardcoded sensitive data:

API Keys and Tokens

  • AWS keys (AKIA*, ASIA*)
  • GitHub tokens (ghp_, gho_)
  • Stripe keys (sk_live_, pk_live_)
  • Generic patterns (api_key=, apiKey:, API_TOKEN)

Credentials

  • Hardcoded passwords (password=, pwd=)
  • Database connection strings with passwords
  • Private keys (BEGIN PRIVATE KEY, BEGIN RSA PRIVATE KEY)
  • Certificate files (.pem, .key, .p12)

Environment Variables

  • Check for proper usage: process.env.API_KEY, os.getenv('DB_PASSWORD')
  • Verify credentials are not committed
  • Identify credential files (.env, secrets.json, config/credentials.yml)

2. Vulnerability Analysis

Dependency Vulnerabilities

  • Check dependencies against CVE databases
  • Identify outdated packages with known vulnerabilities
  • Assess severity (CRITICAL/HIGH/MEDIUM/LOW)
  • Suggest specific version upgrades

Authentication & Authorization

  • Verify authentication on all protected endpoints
  • Check for authorization bypass vulnerabilities
  • Review session management (token expiration, refresh logic)
  • Identify missing authentication checks

Input Validation

  • Check for SQL injection vulnerabilities
  • Identify XSS (Cross-Site Scripting) risks
  • Verify input sanitization for user data
  • Check file upload validation (file type, size, content)

3. Configuration Security

Network Security

  • Verify HTTPS enforcement (no HTTP fallback)
  • Check TLS version (TLS 1.2+ required)
  • Validate certificate configuration
  • Review redirect policies

Read the full file on GitHub · 168 lines

Changes

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.

  1. 2d ago First seen · 168 lines · 9 tokens per session scan A 008adc8bc088

Subscribe to this mod's changes

security-review is a command published in the GitHub repository PaulDuvall/ai-development-patterns (645 stars, last pushed 3d ago), licensed MIT. It adds 9 tokens to every session and 1,089 once invoked, about $0.0000 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.