.claude/skills/security-audit/SKILL.md
Comprehensive security audit covering OWASP Top 10, secrets detection, supply chain security, threat modeling, and language-specific vulnerability patterns. Investigates actual code paths rather than grep-matching keywords. Generates a scored SECURITY_AUDIT.md with prioritized remediation. Use when assessing application security, preparing for a security review, or onboarding to a codebase with security concerns.
npx skillsauth add dirien/yet-another-agent-harness 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.
Investigate the codebase for security vulnerabilities across OWASP Top 10 categories, secrets exposure, supply chain risks, and language-specific patterns. Produces a scored SECURITY_AUDIT.md with prioritized remediation actions.
Core principle: Investigate, do not just grep. Read surrounding code to determine if a match is a genuine vulnerability, a false positive, or already mitigated. Only flag findings with specific file:line evidence and confirmed risk.
git --version 2>/dev/null && git rev-parse --is-inside-work-tree 2>/dev/null
Check for available security tools (optional but enhance analysis):
command -v gitleaks 2>/dev/null && echo "gitleaks: available"
command -v semgrep 2>/dev/null && echo "semgrep: available"
command -v trivy 2>/dev/null && echo "trivy: available"
command -v govulncheck 2>/dev/null && echo "govulncheck: available"
Proceed without tools — manual investigation still works. Note which tools are missing in the report.
Determine what to audit and understand the application:
Run available security tools before manual investigation. Tool findings guide where to focus manual review.
# Secrets in current code and git history
gitleaks detect -v 2>&1
# Static analysis (language-aware rule sets)
semgrep --config=auto --severity=ERROR . 2>&1
# Dependency vulnerabilities
trivy fs --severity HIGH,CRITICAL . 2>&1
# or: govulncheck ./... / npm audit / pip-audit / cargo audit
If tools find issues, verify each one — automated scanners produce false positives. Read the flagged code in context before including in the report.
Systematically investigate each OWASP category relevant to the project. Not all categories apply to all projects — a CLI tool does not need XSS checks; a library does not need CSRF protection.
For each applicable category:
For detailed investigation patterns per OWASP category, see
references/owasp-patterns.md.
Secrets: Scan current code AND git history for hardcoded credentials, API keys, tokens, and connection strings. A secret removed from current code but present in git history is still compromised — flag as CRITICAL.
Supply chain: Check lockfile integrity, dependency vulnerabilities, dependency confusion risk, and maintenance signals for critical dependencies.
For detailed scanning commands and analysis patterns, see
references/secrets-and-supply-chain.md.
Apply STRIDE to the actual codebase:
For detailed threat modeling steps and DREAD scoring, see
references/threat-model.md.
Check for vulnerability patterns specific to the detected languages. Load only the relevant language sections.
For Go, JavaScript/TypeScript, Python, Rust, and .NET patterns, see
references/language-security.md.
For each finding, assign:
Write the report using the template in
references/report-template.md. Include executive summary, detailed
findings with evidence, threat model summary, and prioritized
remediation actions.
Run markdownlint on the generated file.
Show the user:
tools
Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety with tRPC.
development
Use when challenging ideas, plans, decisions, or proposals using structured critical reasoning. Invoke to play devil's advocate, run a pre-mortem, red team, or audit evidence and assumptions.
development
Systematic technical debt analysis across architecture, testing, documentation, and infrastructure. Investigates the codebase, scores findings by impact and effort, and generates a prioritized TECH_DEBT.md remediation plan. Delegates to specialized skills for code quality (scout) and linting (lint-fix). Use when assessing overall project health, planning cleanup sprints, or onboarding to an unfamiliar codebase.
testing
Install and configure Tailscale across platforms. Detects OS, distro, and environment (including WSL2 and containers). Verifies existing installations, performs platform-appropriate install, and guides initial connection. Use when setting up Tailscale on a new machine, onboarding a server to a tailnet, or verifying an existing install.