security-audit

security-audit is a command for Claude Code from Yassinello/claude-plugin-prd-workflow. It costs 11 tokens per session (1,704 once invoked), scanned A, original, MIT.

A codebase security check that looks for vulnerable dependencies, unsafe coding patterns, exposed secrets, and common web weaknesses such as cross-site scripting and SQL injection.

In plain words
What is it for?
Use it to audit a pull request, the whole codebase, or one directory, including JavaScript and TypeScript projects and their package dependencies.
Why use it?
It helps find security problems before code reaches production. It can also show which dependencies need updates and where application code needs closer review.

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/yassinello/claude-plugin-prd-workflow/security-audit
Clone the repo
git clone --depth 1 https://github.com/Yassinello/claude-plugin-prd-workflow

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/yassinello/claude-plugin-prd-workflow/security-audit.svg)](https://agentmods.dev/commands/yassinello/claude-plugin-prd-workflow/security-audit)
Your own site
<a href="https://agentmods.dev/commands/yassinello/claude-plugin-prd-workflow/security-audit"><img src="https://agentmods.dev/badge/commands/yassinello/claude-plugin-prd-workflow/security-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 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,704 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.1 $0.00011 $0.01704
Opus 5 $0.00005 $0.00852
Sonnet 5 $0.00002 $0.00341
Haiku 4.5 $0.00001 $0.00170

Measured 5d ago against content hash 510b2066995a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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-audit.md · 283 lines

How it starts

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

Security Audit Command

Perform comprehensive security analysis using multiple tools and best practices.

Purpose

Detect security vulnerabilities before they reach production:

  • Dependency vulnerabilities (npm audit)
  • Code security issues (ESLint security rules)
  • Hardcoded secrets (git-secrets, pattern matching)
  • Common vulnerability patterns (XSS, SQL injection, etc.)
  • Security best practices compliance

Workflow

Step 1: Determine Scope

Ask user or auto-detect:

🔒 **Security Audit**

Scope options:
1. 🎯 Current PRD (feat/PRD-003-design-system)
2. 📦 Entire codebase
3. 📂 Specific directory

Select scope: (1-3)

Step 2: Dependency Scanning

Run npm/yarn audit:

npm audit --json > .claude/security-audit-deps.json
npm audit

Parse results:

  • Critical vulnerabilities
  • High severity issues
  • Moderate/low issues
  • Recommended fixes

Step 3: Code Security Analysis

Run ESLint with security plugins:

npx eslint . \
  --ext .js,.jsx,.ts,.tsx \
  --config .eslintrc.security.json \
  --format json > .claude/security-audit-code.json

Check for:

  • eval() usage
  • dangerouslySetInnerHTML without sanitization
  • Unvalidated redirects
  • Hardcoded credentials patterns
  • Unsafe RegExp
  • Prototype pollution vectors

Step 4: Secret Detection

Scan for hardcoded secrets:

# Pattern-based detection
grep -r -E "(api[_-]?key|password|secret|token)[\s]*=[\s]*['\"][^'\"]+['\"]" \
  --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" \
  --exclude-dir=node_modules \
  --exclude-dir=.git \
  .

Common patterns to detect:

  • API keys
  • Database passwords
  • JWT secrets
  • AWS credentials
  • Private keys

Step 5: Security Best Practices Check

Validate:

  • Environment Variables: Sensitive data in .env files?
  • .gitignore: Are .env, credentials.json, etc. ignored?
  • HTTPS: Are external API calls using HTTPS?
  • Input Validation: Are user inputs validated?
  • Authentication: Proper auth implementation?
  • CORS: Properly configured?

Read the full file on GitHub · 283 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. 5d ago First seen · 283 lines · 11 tokens per session scan A 510b2066995a

Subscribe to this mod's changes

security-audit is a command published in the GitHub repository Yassinello/claude-plugin-prd-workflow (12 stars, last pushed 9mo ago), licensed MIT. It adds 11 tokens to every session and 1,704 once invoked, about $0.0001 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.