.agents/skills/security-audit/SKILL.md
Scan code for security vulnerabilities, misconfigurations, and exposed secrets. Use when a user asks to audit security, find vulnerabilities, check for OWASP issues, scan for secrets, review dependencies for CVEs, detect SQL injection, find XSS vulnerabilities, or harden an application. Covers OWASP Top 10, dependency auditing, secrets detection, and generates fix recommendations with severity ratings.
npx skillsauth add jaem1n207/synchronize-tab-scrolling security-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Perform comprehensive security audits on codebases by scanning for OWASP Top 10 vulnerabilities, checking dependencies for known CVEs, detecting leaked secrets and API keys, and generating prioritized fix recommendations. This skill combines static analysis patterns with dependency auditing tools.
When a user asks you to audit their code for security issues, follow these steps:
Ask or infer what to audit:
Run the appropriate audit tool for the project:
# Node.js
npm audit --json 2>/dev/null || npx audit-ci --config /dev/null
# Python
pip-audit --format=json 2>/dev/null || pip install pip-audit && pip-audit --format=json
# General (if trivy is available)
trivy fs --security-checks vuln .
Parse results and categorize by severity (Critical, High, Medium, Low).
Search the codebase for common secret patterns:
# Check for common patterns
grep -rn --include="*.{js,ts,py,java,go,rb,env,yml,yaml,json,xml,conf}" \
-E "(password|secret|api_key|apikey|token|private_key|aws_access|stripe_sk|ghp_|gho_|sk-[a-zA-Z0-9]{20,})" \
--exclude-dir={node_modules,.git,dist,build,vendor,__pycache__} .
Also check for:
.env files committed to git: git ls-files | grep -i '\.env'grep -rn "BEGIN.*PRIVATE KEY" .Review source code for these critical patterns:
A01 — Broken Access Control:
* with credentialsA02 — Cryptographic Failures:
A03 — Injection:
# VULNERABLE — SQL injection
query = f"SELECT * FROM users WHERE id = {user_input}"
cursor.execute(query)
# SAFE — parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", (user_input,))
os.system, exec, child_process.exec)A05 — Security Misconfiguration:
A07 — Cross-Site Scripting (XSS):
dangerouslySetInnerHTML with user inputinnerHTML assignment without sanitizationv-html directive with untrusted dataProduce a structured report with findings grouped by severity:
# Security Audit Report
**Project:** project-name
**Date:** 2026-02-17
**Files scanned:** 142
**Issues found:** 8 (2 Critical, 3 High, 2 Medium, 1 Low)
## Critical
### [C1] SQL Injection in user query — src/db/users.py:45
- **Category:** A03 Injection
- **Description:** User input concatenated directly into SQL query
- **Fix:** Use parameterized queries with `cursor.execute(query, params)`
## High
### [H1] Hardcoded Stripe secret key — src/config.js:12
- **Category:** A02 Cryptographic Failures
- **Description:** `sk_live_EXAMPLE_ROTATE_IMMEDIATELY` found in source
- **Fix:** Move to environment variable, rotate the key immediately
For each finding, provide:
User request: "Run a security audit on this Express project"
Actions taken:
npm audit — found 3 vulnerabilities (1 critical in jsonwebtoken < 9.0.0)src/config/aws.js/api/admin/usersReport summary:
Issues found: 7 (1 Critical, 3 High, 2 Medium, 1 Low)
Critical:
- [email protected] has a signature bypass vulnerability (CVE-2022-23529)
Fix: npm install [email protected]
High:
- AWS_SECRET_ACCESS_KEY hardcoded in src/config/aws.js:8
Fix: Move to .env, add .env to .gitignore, rotate the key
- /api/admin/users route missing authentication middleware
Fix: Add authMiddleware to route: router.get('/api/admin/users', authMiddleware, handler)
- No security headers configured
Fix: npm install helmet && app.use(helmet())
Medium:
- CORS allows all origins with credentials (src/app.js:15)
Fix: Specify allowed origins explicitly
- Error handler returns stack traces (src/middleware/error.js:8)
Fix: Only return stack traces when NODE_ENV !== 'production'
User request: "Check my Django app for leaked secrets and vulnerable packages"
Actions taken:
pip-audit — found 2 vulnerable packagesReport summary:
Issues found: 4 (1 Critical, 2 High, 1 Medium)
Critical:
- Django SECRET_KEY committed in settings.py:23
Value: 'django-insecure-x#k2!7...'
Fix: Use os.environ.get('DJANGO_SECRET_KEY') and generate a new key
High:
- Pillow==9.0.0 — CVE-2023-44271 (DoS via large TIFF)
Fix: pip install Pillow>=10.0.1
- Stripe secret key in views.py:67: sk_live_...
Fix: Move to environment variable, rotate key in Stripe dashboard
Medium:
- DEBUG = True in settings.py (check DJANGO_DEBUG env in production)
Fix: DEBUG = os.environ.get('DJANGO_DEBUG', 'False') == 'True'
.gitignore for missing entries (.env, *.pem, *.key).tools
Build cross-browser extensions with WXT — the modern framework for Chrome, Firefox, Safari, and Edge extensions. Use when someone asks to "build a browser extension", "Chrome extension with React", "WXT framework", "cross- browser extension", "manifest v3 extension", "build Firefox extension", or "browser extension with TypeScript". Covers content scripts, background workers, popup/options pages, storage, messaging, and publishing.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
testing
Assists with unit and integration testing using Vitest, a Vite-native test runner. Use when writing tests, configuring mocks, setting up coverage, or migrating from Jest. Trigger words: vitest, unit testing, test runner, vi.fn, vi.mock, test coverage, jest replacement.