security-audit
БесплатноБез исполняемых скриптовНе проверенScan code for security vulnerabilities, misconfigurations, and exposed secrets. Use when a user asks to audit security, find vulnerabilities, check for OWASP…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Security Audit
Overview
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.
Instructions
When a user asks you to audit their code for security issues, follow these steps:
Step 1: Determine audit scope
Ask or infer what to audit:
- Code vulnerabilities — OWASP Top 10 patterns in source code
- Dependencies — known CVEs in packages
- Secrets — hardcoded API keys, passwords, tokens
- Configuration — insecure headers, CORS, TLS settings
- All of the above (default if not specified)
Step 2: Scan dependencies for known vulnerabilities
Run the appropriate audit tool for the project:
# Node.js (reads package-lock.json; --omit=dev skips dev dependencies)
npm audit --json
npm audit --omit=dev --audit-level=high
# Python (installed environment, or a requirements file)
pip install pip-audit
pip-audit -f json
pip-audit -r requirements.txt
# Any ecosystem (lockfiles in the tree), if osv-scanner or trivy is installed
osv-scanner scan source -r .
trivy fs --scanners vuln,secret .
npm audit exits non-zero when it finds anything, so do not treat the exit code as a tool failure. trivy fs --security-checks was replaced by --scanners.
Parse results and categorize by severity (Critical, High, Medium, Low).
Step 3: Scan for hardcoded secrets
Search the codebase for common secret patterns:
grep -rIn -E "(password|secret|api_?key|token|private_key|AKIA[0-9A-Z]{16}|sk_live_|ghp_|sk-[A-Za-z0-9]{20,})" \
--include="*.js" --include="*.ts" --include="*.py" --include="*.go" --include="*.rb" \
--include="*.yml" --include="*.yaml" --include="*.json" --include=".env*" \
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist --exclude-dir=vendor .
(--include="*.{js,ts}" does not work in grep; repeat --include instead.) A dedicated scanner finds far more than this grep, including secrets in git history:
gitleaks dir . # working tree
gitleaks git . # full git history
Also check for:
.envfiles committed to git:git ls-files | grep -i '\.env'- Private keys:
grep -rn "BEGIN.*PRIVATE KEY" . - High-entropy strings that look like tokens
Step 4: Analyze code for OWASP Top 10 vulnerabilities
Review source code for these critical patterns:
Use the 2025 edition numbering (A01 Broken Access Control, A02 Security Misconfiguration, A03 Software Supply Chain Failures, A04 Cryptographic Failures, A05 Injection, A06 Insecure Design, A07 Authentication Failures, A08 Software or Data Integrity Failures, A09 Security Logging and Alerting Failures, A10 Mishandling of Exceptional Conditions). Older reports use the 2021 numbers, so state which one you cite.
A01 Broken Access Control:
- Missing auth checks on API routes
- Direct object reference without ownership validation
- CORS set to
*with credentials; server-side request forgery (SSRF now sits here)
A02 Security Misconfiguration:
- Debug mode enabled in production, default credentials, verbose stack traces
- Missing security headers (CSP, X-Frame-Options, HSTS)
A03 Software Supply Chain Failures:
- Vulnerable or unmaintained dependencies (Step 2), unpinned versions, missing lockfiles
- Install scripts and CI actions referenced by a mutable tag instead of a commit SHA
A04 Cryptographic Failures:
- Hardcoded encryption keys
- MD5/SHA1 for passwords (use argon2id, scrypt or bcrypt)
- HTTP URLs for sensitive data transfer
A05 Injection (includes XSS):
# 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,))
- String concatenation in SQL queries
- Unsanitized input in shell commands (
os.system,exec,child_process.exec) - Template injection (user input in template strings)
dangerouslySetInnerHTML,innerHTMLorv-htmlwith untrusted data
A07 Authentication Failures:
- Weak or missing rate limiting on login, long-lived tokens, JWTs accepted without signature or
algchecks
A09 / A10: security events not logged, and error handling that fails open (an exception in an auth check that lets the request through).
Step 5: Generate the security report
Produce a structured report with findings grouped by severity:
# Security Audit Report
**Project:** project-name
**Date:** 2026-10-13
**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:** A05 Injection
- **Description:** User input concatenated directly into SQL query
- **Fix:** Use parameterized queries with `cursor.execute(query, params)`
## High
###
Установить security-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл security-audit?
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 the OWASP Top 10 (2025), dependency auditing, secrets detection, and generates fix recommendations with severity ratings.
Как установить скилл security-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл security-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic