security-audit

A code-review instruction for examining a project for security weaknesses, such as unsafe authentication, SQL injection, file-upload problems, or exposed secrets. It uses common security guidance and asks for severity levels and fixes.

In plain words
What is it for?
Use it to audit a whole codebase or focus on areas such as login, APIs, databases, uploads, or secret handling.
Why use it?
It provides a systematic way to find and prioritize security problems across application and infrastructure code.

Command for Claude Code

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/centminmod/my-claude-code-setup/security-audit
Clone the repo
git clone --depth 1 https://github.com/centminmod/my-claude-code-setup

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 568 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.00000 $0.00568
Opus 5 $0.00000 $0.00284
Sonnet 5 $0.00000 $0.00114
Haiku 4.5 $0.00000 $0.00057

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

Security

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

.claude/commands/security/security-audit.md · 102 lines

How it starts

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

Security Audit

Perform a comprehensive security audit of the codebase to identify potential vulnerabilities, insecure patterns, and security best practice violations.

Usage Examples

Basic Usage

"Run a security audit on this project" "Check for security vulnerabilities in the authentication module" "Scan the API endpoints for security issues"

Specific Audits

"Check for SQL injection vulnerabilities" "Audit the file upload functionality for security risks" "Review authentication and authorization implementation" "Check for hardcoded secrets and API keys"

Instructions for Claude

When performing a security audit:

  1. Systematic Scanning: Examine the codebase systematically for common vulnerability patterns
  2. Use OWASP Guidelines: Reference OWASP Top 10 and other security standards
  3. Check Multiple Layers: Review frontend, backend, database, and infrastructure code
  4. Prioritize Findings: Categorize issues by severity (Critical, High, Medium, Low)
  5. Provide Remediation: Include specific fixes for each identified issue

Security Checklist

Authentication & Authorization
  • Password storage and hashing methods
  • Session management security
  • JWT implementation and validation
  • Access control and permission checks
  • Multi-factor authentication support
Input Validation & Sanitization
  • SQL injection prevention
  • XSS (Cross-Site Scripting) protection
  • Command injection safeguards
  • Path traversal prevention
  • File upload validation
Data Protection
  • Encryption in transit (HTTPS/TLS)
  • Encryption at rest
  • Sensitive data exposure
  • API key and secret management
  • PII handling compliance
Common Vulnerabilities
  • CSRF protection
  • Clickjacking prevention
  • Security headers configuration
  • Dependency vulnerabilities
  • Insecure direct object references
API Security
  • Rate limiting implementation
  • API authentication methods
  • Input validation on endpoints
  • Error message information leakage
  • CORS configuration

Read the full file on GitHub · 102 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 · 102 lines · 0 tokens per session scan A 59835092677e

Subscribe to this mod's changes

security-audit is a command published in the GitHub repository centminmod/my-claude-code-setup (2,614 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 568 tokens. 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.