security-audit
OWASP-guided security code review for a specific domain or issue
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
OWASP-guided security code review for a specific domain or issue
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Automatically implement all sub-issues of an epic in dependency order
Implement a GitHub issue with automated PR creation
End-of-session retrospective. Captures knowledge from any working session (debug, implementation, config, deployment) as reusable scripts, CLAUDE.md procedures, or skill proposals. Run before ending a session to prevent knowledge loss.
Decompose a large GitHub issue into sub-issues and create a tracking draft PR
Project kickoff checklist based on lessons learned from previous projects. Generates a tailored checklist and optionally creates GitHub issues.
Generate a professional architecture diagram from codebase analysis
| name | security-audit |
| description | OWASP-guided security code review for a specific domain or issue |
| argument-hint | <issue-number|domain> |
| user-invocable | true |
Perform a structured, OWASP-guided security code review for a specific security domain. Designed to work with security epic sub-issues โ reads the issue to understand what domain to audit, then systematically scans the codebase and produces a structured report.
$ARGUMENTS โ either a GitHub issue number (e.g., 631) or a security domain keyword.
Supported domains:
dependencies โ Dependency vulnerability audit (npm + pip)auth โ Authentication & authorization reviewinput-validation โ OWASP Top 10 input validation (SQLi, XSS, SSRF, etc.)file-uploads โ File upload security reviewheaders โ HTTP security headers auditrate-limiting โ Rate limiting reviewdatabase โ Database security reviewinfrastructure โ Infrastructure, secrets, Docker, session securitypentest โ OWASP ZAP baseline scanci-cd โ CI/CD pipeline and GitHub Actions security reviewIf a number is provided, fetch the issue and infer the domain from its title/body.
$ARGUMENTS is a number:~/.claude/bin/gh-save.sh /tmp/security-audit-$ARGUMENTS.json issue view $ARGUMENTS --json title,body,labels
Read the file and determine which domain to audit from the issue content.
$ARGUMENTS is a domain keyword:Use it directly.
Each domain has a specific audit procedure. Follow the relevant one below.
dependencies~/.claude/bin/deps-audit.sh
Report sections: Findings table, remediation steps, accepted risks (if any).
authSystematic code review of authentication and authorization:
**/auth/**, **/security.*, **/middleware.*, **/dependencies.*WHERE user_id = current_user.idReport sections: Auth mechanism summary, findings, risk assessment.
input-validationOWASP Top 10 focused review. Verify defense-in-depth: input should be validated at multiple independent layers, so removing one layer does not compromise security.
Layer check (verify each layer is present):
.., null bytes, injection patterns)Specific vulnerability checks:
Grep for text(, execute(, raw_connection, .raw(, f"SELECT, f"INSERT, f"UPDATE, f"DELETEdangerouslySetInnerHTML, innerHTML, document.writesubprocess, os.system, os.popen, exec(, eval(../ sanitization, os.path.join with user inputrequests.get, httpx, fetch, urllib)Report sections: Per-category findings with file:line references, severity, remediation.
file-uploads**/upload*, **/photo*, **/file*, **/media*~/.claude/bin/secret-scan.sh
Report sections: Upload flow diagram, validation checks present, gaps found.
headers~/.claude/bin/security-headers-check.sh <url>
Report sections: Current header status, missing headers with recommended values, implementation location.
rate-limitingrate_limit, throttle, slowapi, RateLimiter, limitermain.py and middleware configurationsReport sections: Current rate limiting map, unprotected critical endpoints, implementation recommendation.
database**request.dict() to ORM model without schema validationReport sections: Query safety assessment, schema review, data exposure check.
infrastructure~/.claude/bin/secret-scan.sh
~/.claude/bin/env-audit.sh
~/.claude/bin/docker-audit.sh
Report sections: Automated scan results, manual findings, remediation steps.
ci-cdCI/CD pipeline security review focused on GitHub Actions supply chain attacks.
Find all workflows:
.github/workflows/*.yml and .github/workflows/*.yamlPwn Request (CRITICAL): For each workflow, check the trigger event:
pull_request_target with access to secrets = CRITICAL in public repos (allows external PRs to steal secrets)pull_request_target that checks out PR head (ref: ${{ github.event.pull_request.head.sha }}) and runs untrusted code = CRITICALpull_request is safe (forks don't get secret access)push, workflow_run, workflow_dispatch, schedule are safe (no external trigger)Script injection: Search all workflow files for untrusted input in run: blocks:
${{ github.event.pull_request.title }} โ attacker-controlled PR title injected into shell${{ github.event.pull_request.body }} โ attacker-controlled PR body${{ github.event.issue.title }} โ attacker-controlled issue title${{ github.event.issue.body }} โ attacker-controlled issue body${{ github.event.comment.body }} โ attacker-controlled comment${{ github.head_ref }} โ attacker-controlled branch nameenv:) or actions/github-script instead of shell interpolationThird-party Actions pinning: Check all uses: references:
uses: actions/checkout@v4 (mutable tag) = MEDIUM โ could be replaced by compromised taguses: actions/checkout@<full-sha> (pinned hash) = secureuses: owner/action@main (branch ref) = HIGH โ tracks mutable branchactions/*) with version tags = acceptable riskPermissions audit: For each workflow:
permissions: = MEDIUM (defaults to broad read/write)permissions: write-all or contents: write where not needed = MEDIUMid-token: write should only be present for OIDC deployments (e.g., GitHub Pages, cloud providers)Secret exposure patterns:
env: at workflow level instead of step level (broader exposure)echo or debug outputif: always() stepsRepository visibility context:
Report sections: Workflow inventory table (name, triggers, permissions, secrets used), findings by severity, third-party action inventory, remediation steps.
pentest~/.claude/bin/owasp-zap-scan.sh <url>
/tmp/zap-results/)Report sections: ZAP scan summary, triaged findings, remediation priorities.
Produce a structured report with:
## Security Audit Report: <domain>
**Issue:** #<number> (if applicable)
**Date:** <today>
**Auditor:** Claude Code (automated)
### Executive Summary
<1-3 sentences: overall assessment and critical findings count>
### Findings
| # | Severity | Finding | File | Remediation |
|---|----------|---------|------|-------------|
| 1 | CRITICAL | ... | path:line | ... |
| 2 | HIGH | ... | path:line | ... |
| 3 | MEDIUM | ... | path:line | ... |
### Detailed Findings
<per finding: description, evidence, remediation steps>
### Verified Controls
<what was checked and found to be secure โ important for audit trail>
### Recommendation
<PASS / PASS WITH WARNINGS / FAIL โ and next steps>
If $ARGUMENTS was an issue number:
/tmp/security-audit-report-$ARGUMENTS.md using the Write toolgh issue comment $ARGUMENTS --body-file /tmp/security-audit-report-$ARGUMENTS.md
If $ARGUMENTS was a domain keyword: