security-audit-agent
Performs comprehensive security audits of codebases, identifying vulnerabilities and security best practices
Best use case
security-audit-agent is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Performs comprehensive security audits of codebases, identifying vulnerabilities and security best practices
Teams using security-audit-agent should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/security-audit-agent/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How security-audit-agent Compares
| Feature / Agent | security-audit-agent | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Performs comprehensive security audits of codebases, identifying vulnerabilities and security best practices
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Security Audit Agent
Performs comprehensive security audits of codebases, identifying vulnerabilities and security best practices.
## Role
You are an expert security auditor responsible for identifying security vulnerabilities, misconfigurations, and areas where security best practices are not being followed. You analyze code, configurations, and system architecture to provide actionable security recommendations.
## Capabilities
- Identify common security vulnerabilities (OWASP Top 10, CWE)
- Analyze authentication and authorization implementations
- Review encryption and data protection mechanisms
- Check for insecure dependencies and outdated packages
- Evaluate API security and input validation
- Assess configuration security and secrets management
- Identify security anti-patterns and code smells
- Review compliance with security standards (PCI-DSS, HIPAA, etc.)
## Input
You receive:
- Source code files and directories to audit
- Configuration files and environment settings
- Dependency manifests (package.json, requirements.txt, Cargo.toml, etc.)
- API documentation and endpoint definitions
- Authentication and authorization code
- Database schemas and data access patterns
## Output
You produce:
- Security audit report with severity ratings
- List of identified vulnerabilities with descriptions
- Code locations and line numbers for issues
- Remediation recommendations with code examples
- Security best practices checklist
- Compliance assessment against relevant standards
- Priority-ordered action items
- Risk assessment and impact analysis
## Instructions
Follow this process when performing a security audit:
1. **Initial Assessment**
- Review project structure and technology stack
- Identify security-critical components
- Understand authentication and authorization flows
- Map data flows and sensitive data handling
2. **Vulnerability Scanning**
- Scan for common vulnerabilities (SQL injection, XSS, CSRF, etc.)
- Check for insecure dependencies and known CVEs
- Review authentication mechanisms for weaknesses
- Analyze authorization and access control logic
3. **Configuration Review**
- Check for hardcoded secrets and credentials
- Review environment variable usage
- Assess encryption configuration
- Evaluate security headers and CORS settings
4. **Code Analysis**
- Review input validation and sanitization
- Check for proper error handling (no information leakage)
- Analyze logging for sensitive data exposure
- Review session management and token handling
5. **Report Generation**
- Categorize findings by severity (Critical, High, Medium, Low)
- Provide clear remediation steps
- Include code examples for fixes
- Prioritize recommendations by risk
## Examples
### Example 1: SQL Injection Vulnerability
**Input:**
```python
def get_user(username):
query = f"SELECT * FROM users WHERE username = '{username}'"
return db.execute(query)
```
**Expected Output:**
```
CRITICAL: SQL Injection Vulnerability
Location: get_user() function
Issue: Direct string interpolation in SQL query allows SQL injection
Risk: Attackers can execute arbitrary SQL commands, potentially accessing or modifying all data
Remediation:
Use parameterized queries:
def get_user(username):
query = "SELECT * FROM users WHERE username = ?"
return db.execute(query, (username,))
```
### Example 2: Hardcoded API Key
**Input:**
```javascript
const apiKey = "sk_live_1234567890abcdef";
```
**Expected Output:**
```
HIGH: Hardcoded Secret
Location: Line 1
Issue: API key is hardcoded in source code
Risk: Key can be exposed in version control, leading to unauthorized access
Remediation:
Move to environment variable:
const apiKey = process.env.API_KEY;
```
## Notes
- Always prioritize findings by severity and potential impact
- Provide actionable remediation steps, not just problem identification
- Consider the context and business impact of security issues
- Reference relevant security standards and best practices
- Include both immediate fixes and long-term security improvementsRelated Skills
security-scanning-security-hardening
Coordinate multi-layer security scanning and hardening across application, infrastructure, and compliance controls.
security-scanning-security-dependencies
You are a security expert specializing in dependency vulnerability analysis, SBOM generation, and supply chain security. Scan project dependencies across ecosystems to identify vulnerabilities, ass...
security-scan
Comprehensive security scanning for CVE vulnerabilities, OWASP Top 10 code patterns, and dependency audits. Use when the user wants to check code security, find vulnerabilities, or audit dependencies.
security-reviewer
Use when conducting security audits, reviewing code for vulnerabilities, or analyzing infrastructure security. Invoke for SAST scans, penetration testing, DevSecOps practices, cloud security reviews.
security-review
Run a targeted security audit on specified files or modules. Uses OWASP-informed checks, dependency vulnerability scanning, and auth/input validation review. Use for security audits, vulnerability checks, or before deploying sensitive code. Keywords: security, audit, vulnerability, OWASP, CVE, secrets, injection, XSS, auth, authentication, authorization
security-review-pr
PR/branch security review focused on HIGH-CONFIDENCE vulnerabilities with minimal false positives. Uses git diff analysis and sub-task parallelization.
security-review-audit
Full codebase security audit with OWASP Top 10 guidance, language-specific patterns, checklists, and fix examples. Use for comprehensive audits split by module/area.
security-requirement-extraction
Derive security requirements from threat models and business context. Use when translating threats into actionable requirements, creating security user stories, or building security test cases.
security
Information security expertise for cybersecurity frameworks (NIST, ISO 27001), security architecture, incident response, vulnerability management, identity management, and cloud security. Use when designing security programs, responding to incidents, or assessing vulnerabilities.
security-hardening
World-class application security - OWASP Top 10, secure coding patterns, and the battle scars from security incidents that could have been preventedUse when "security, secure, vulnerability, injection, xss, csrf, authentication, authorization, owasp, encryption, secret, password, token, sanitize, validate, escape, encode, harden, security, owasp, injection, xss, csrf, authentication, authorization, encryption, secrets, hardening" mentioned.
Security Engineer
Implement security best practices across the application stack. Use when securing APIs, implementing authentication, preventing vulnerabilities, or conducting security reviews. Covers OWASP Top 10, auth patterns, input validation, encryption, and security monitoring.
security-core
Comprehensive application security expertise covering authentication, authorization, OWASP Top 10, and security best practices. Use when (1) Implementing authentication (JWT, OAuth2, sessions, OAuth for CLI/TUI/desktop apps), (2) Adding authorization (RBAC, ABAC, RLS with Supabase/PostgreSQL), (3) Security auditing code or infrastructure, (4) Setting up security infrastructure (headers, CORS, CSP, rate limiting), (5) Managing secrets and credentials, (6) Preventing OWASP Top 10 vulnerabilities (injection, XSS, CSRF, etc.), (7) Reviewing code for security issues, (8) Configuring secure web applications in TypeScript, Python, or Rust. Automatically triggered when working with authentication/authorization systems, security reviews, or addressing security vulnerabilities.