Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL injection, XSS, or command injection. Use when the user mentions security scans, vulnerability detection, secret leaks, API keys, OWASP, npm audit, pip-audit, hardcoded passwords, or code security checks.
npx skills add https://github.com/zebbern/claude-code-guide --skill code-vuln-audit
A code security scanning tool with three core scanning capabilities:
# Scan the current directory (all checks)
python3 scripts/security_scan.py .
# Scan dependencies only
python3 scripts/security_scan.py --mode deps .
# Detect secret leaks only
python3 scripts/security_scan.py --mode secrets /path/to/project
# Detect OWASP security patterns only
python3 scripts/security_scan.py --mode owasp .
# Output report in JSON format
python3 scripts/security_scan.py --format json --output report.json .
# Only show findings at high severity and above
python3 scripts/security_scan.py --severity high .
Automatically detects the project type and invokes the appropriate tool:
| Project Type | Detection File | Tool Used |
|---|---|---|
| Node.js | package.json + package-lock.json | npm audit |
| Python | requirements.txt / pyproject.toml / Pipfile | pip-audit |
If the corresponding audit tool is not installed, a helpful message is displayed instead of an error.
Detection is performed in two ways:
Regex Matching: Covers common secret formats
| Secret Type | Example Pattern |
|---|---|
| AWS Access Key | 20-character string starting with AKIA |
| GitHub Token | Starts with ghp_ or github_pat_ |
| Slack Token | Starts with xoxb- or xoxp- |
| Stripe Key | Starts with sk_live_ or pk_live_ |
| Private Key File | -----BEGIN PRIVATE KEY----- |
| Generic API Key | Format like api_key = "..." |
| Credentials in URL | https://user:pass@host |
| JWT Token | eyJ... format |
Shannon Entropy Analysis: Computes information entropy for string constants in code (threshold > 4.5 and length >= 20) to discover secrets in non-standard formats.
Covers statically detectable security patterns from the OWASP Top 10:
| OWASP Category | Detection Patterns |
|---|---|
| A02: Cryptographic Failures | Weak hashes (MD5/SHA1), weak ciphers (DES/RC4) |
| A03: Injection | SQL injection, command injection (os.system / subprocess shell / eval / exec), XSS (innerHTML / document.write / dangerouslySetInnerHTML / v-html) |
| A04: Insecure Design | Path traversal |
| A05: Security Misconfiguration | Debug mode enabled, CORS wildcard, binding to 0.0.0.0 |
| A08: Integrity Failures | Insecure deserialization (pickle / yaml.load / marshal / unserialize) |
| A10: SSRF | User input passed directly to HTTP requests |
Supported languages: Python, JavaScript/TypeScript, Java, PHP, Ruby, Go, and more.
| Parameter | Description | Default |
|---|---|---|
| TARGET | Directory to scan | Current directory |
| --mode MODE | Scan mode: all, deps, secrets, owasp | all |
| --format FORMAT | Output format: text, json | text |
| --output FILE | Output file path | stdout |
| --severity LEVEL | Minimum reporting level: low, medium, high, critical | low |
| --exclude-dir DIR | Additional directories to exclude (repeatable) | - |
| --max-file-kb SIZE | Maximum file size to scan in KB | 512 |
| -h, --help | Show help | - |
=== Security Scan Report ===
Target: /path/to/project
Modules: deps, secrets, owasp
[CRITICAL] AWS Access Key ID
File: src/config.py:15
Code: AWS_KEY = "AKIAIOSFODNN7EXAMPLE"
[HIGH] SQL Injection (f-string)
File: src/db.py:42
Code: cursor.execute(f"SELECT * FROM users WHERE id={user_id}")
--- Summary ---
Critical: 1 | High: 1 | Medium: 0 | Low: 0
Total findings: 2
{
"target": "/path/to/project",
"scan_time": "2026-04-14T10:30:00",
"findings": [
{
"scanner": "secrets",
"name": "AWS Access Key ID",
"severity": "critical",
"file": "src/config.py",
"line": 15,
"snippet": "AWS_KEY = \"AKIAIOSFODNN7EXAMPLE\"",
"category": "secret-pattern"
}
],
"summary": {"critical": 1, "high": 0, "medium": 0, "low": 0, "total": 1}
}
| Exit Code | Meaning |
|---|---|
| 0 | No findings |
| 1 | Findings present (at least one security issue) |
| 2 | Scanner internal error |
npm (for Node.js projects), pip-audit (for Python projects)You are a dependency security expert specializing in vulnerability scanning, license compliance, and supply chain security. Analyze project dependencies for known vulnerabilities, licensing issues, outdated packages, and provide actionable remediation strategies.
Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review/report, or secure-by-default coding help. Trigger only for supported languages (python, javascript/typescript, go). Do not trigger for general code review, debugging, or non-security tasks.
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework. Features include email/password authentication with verification, OAuth providers (Google, GitHub, Discord, etc.), two-factor authentication (TOTP, SMS), passkeys/WebAuthn support, session management, role-based access control (RBAC), rate limiting, and database adapters. Use when adding authentication to applications, implementing OAuth flows, setting up 2FA/MFA, managing user sessions, configuring authorization rules, or building secure authentication systems for web applications.
Package entire code repositories into single AI-friendly files using Repomix. Capabilities include pack codebases with customizable include/exclude patterns, generate multiple output formats (XML, Markdown, plain text), preserve file structure and context, optimize for AI consumption with token counting, filter by file types and directories, add custom headers and summaries. Use when packaging codebases for AI analysis, creating repository snapshots for LLM context, analyzing third-party libraries, preparing for security audits, generating documentation context, or evaluating unfamiliar codebases.
You are a dependency security expert specializing in vulnerability scanning, license compliance, and supply chain security. Analyze project dependencies for known vulnerabilities, licensing issues, outdated packages, and provide actionable remediation strategies.
Expert patterns for HubSpot CRM integration including OAuth authentication, CRM objects, associations, batch operations, webhooks, and custom objects. Covers Node.js and Python SDKs.
Perform language and framework specific security best-practice reviews and suggest improvements. Use when the user explicitly requests security best practices guidance, a security review or report, or secure-by-default coding help. Supports Python, JavaScript/TypeScript, and Go. Do NOT use for general code review, debugging, threat modeling (use security-threat-model), or non-security tasks.
Configures API gateways for routing, authentication, rate limiting, and request transformation in microservice architectures. Use when setting up Kong, Nginx, AWS API Gateway, or Traefik for centralized API management.
Take zebbern/code-vuln-audit from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.