security-audit-expert/SKILL.md
MUST use whenever the user asks for a security audit, vulnerability assessment, penetration test review, security scan, compliance check (GDPR, SOC2, PCI-DSS), or hardening review of any codebase, API, frontend, or infrastructure. Triggers on phrases like: "audit security", "security review", "check for vulns", "scan for secrets", "assess compliance", "pentest review", "hardening audit", "OWASP check", "CWE audit", "SAST/DAST", "security posture", or any request that involves finding vulnerabilities, misconfigurations, credential leaks, injection flaws, auth weaknesses, or data-exposure risks in code. Use this skill even if the user only mentions a subset (e.g., "check JWT auth") — the skill will scope appropriately.
npx skillsauth add arielsand/my-opencode-skills security-audit-expertInstall 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.
Perform exhaustive, production-grade security audits of codebases, APIs, frontends, and infrastructure configurations. The audit produces a dual-output report (Markdown + JSON) with severity ratings, OWASP/CWE references, concrete file paths, and actionable remediation.
Before scanning, determine the following by inspecting the workspace and interpreting the user's request:
Audit Depth
full (default if not specified) — execute all 11 phases.quick — skip deep static analysis and dynamic testing; run phases
0–2, 3 (surface-level), 4 (surface-level), 7 (surface-level), 11 only.formal — enable compliance mapping and SAST/DAST in addition to full.Compliance Frameworks (off by default)
formal.COMPLIANCE=gdpr,soc2,pcidss (any subset).SAST / DAST (off by default)
formal.SAST=1, DAST=1.Scope Boundaries
.gitignore and node_modules/ / vendor/ exclusions.Output Directory
./security-audit-outputs/ (create if missing).AKIA..., ghp_..., sk-..., private_key, password, secret,
api_key, token, Bearer ) in source files, configs, and env examples.
Flag hardcoded credentials, even in "test" or "example" files.composer.lock, package-lock.json, Cargo.lock,
Pipfile.lock, go.mod, requirements.txt for known CVEs via
grep + common vulnerability keywords (CVE-, XSS, RCE, SQLi,
prototype pollution, path traversal). Note: this is a heuristic scan,
not a live advisory DB lookup; flag anything suspicious for manual review.Dockerfile, docker-compose.yml, *.tf,
*.yaml (K8s) for root containers, exposed ports, missing health checks,
and secrets in env vars.none, HS256
vs RS256), expiry, refresh logic, revocation.eval, exec,
innerHTML, dangerouslySetInnerHTML, and similar injection vectors.raw(), query(), unprepared()).innerHTML, document.write, user-input reflection,
missing Content-Security-Policy.package.json (typo-squatting heuristics)..env files for production secrets, debug flags (APP_DEBUG=true),
and weak DB credentials.Enabled only if COMPLIANCE flag is set.
Enabled only if SAST=1 or DAST=1.
Produce two files in the output directory:
report.md — Human-readable full report.report.json — Machine-readable structured summary.Regardless of audit depth (full, quick, or formal) and regardless of whether compliance mapping or SAST/DAST is enabled, the Markdown report MUST contain ALL of the following sections in this exact order:
If the audit depth is formal or compliance is enabled, you may append extra detail (e.g., CVSS scores, STRIDE tables, PCI-DSS requirement mapping) inside the relevant sections above, but you must NOT drop the standard sections or reorder them.
Use this exact structure. Replace bracketed placeholders.
# Security Audit Report — <Project Name>
**Date**: <YYYY-MM-DD>
**Auditor**: Security Audit Expert (AI-assisted)
**Scope**: <description>
**Compliance**: <enabled frameworks or "None">
**SAST/DAST**: <enabled or "None">
## Executive Summary
- Risk posture table: Critical / High / Medium / Low / Info counts
- Top 3 immediate actions (numbered)
- Scope assumptions and limitations (bulleted)
## Methodology
- Phases executed (list 1–11; mark skipped phases as "Skipped — not requested")
- Tools used (grep, read, pattern matching)
- Limitations (no live CVE DB, no destructive testing)
## Findings
### Critical
| ID | Finding | File | Line | OWASP | CWE | Remediation |
|----|---------|------|------|-------|-----|-------------|
| F01 | ... | ... | ... | A07 | CWE-798 | ... |
### High
... (same table columns)
### Medium
... (same table columns)
### Low
... (same table columns)
### Info
... (same table columns)
## Compliance Matrix (if enabled)
| Finding | GDPR | SOC2 | PCI-DSS | Status |
|---------|------|------|---------|--------|
## SAST / DAST Results (if enabled)
### SAST
- Methodology summary
- File-level taint findings
### DAST
- Endpoints tested
- Observed anomalies
## Remediation Roadmap
### Immediate (0–7 days)
### Short-term (1–4 weeks)
### Long-term (1–3 months)
## Attestation
> This audit was performed using automated static analysis and non-destructive
> dynamic probing where enabled. It does not replace a full manual penetration
> test by a certified security engineer.
{
"meta": {
"project": "string",
"date": "string",
"scope": "string",
"compliance": ["gdpr", "soc2", "pcidss"],
"sast_enabled": true,
"dast_enabled": true
},
"summary": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0,
"info": 0
},
"findings": [
{
"id": "F01",
"severity": "Critical|High|Medium|Low|Info",
"title": "string",
"description": "string",
"affected_files": ["path:line"],
"owasp": "string",
"cwe": "string",
"remediation": "string",
"compliance_mapping": {
"gdpr": ["Art. 32"],
"soc2": ["CC6.1"],
"pcidss": ["Req 6.5"]
}
}
],
"remediation_roadmap": {
"immediate": ["string"],
"short_term": ["string"],
"long_term": ["string"]
},
"sast": {
"methodology": "string",
"findings": []
},
"dast": {
"endpoints_tested": ["string"],
"findings": []
}
}
rm, drop, migrate:fresh, etc.)..gitignore.data-ai
Track work sessions and maintain a WORKLOG.md file. Use this skill at the end of any significant work session, when the user asks to log work, update the worklog, or track time spent. Also use when the user says things like "log this", "update worklog", "track time", "record what we did", or "add to worklog". This skill should be used proactively at natural stopping points like finishing a feature, fixing a bug, or ending a coding session.
documentation
Generate or update CODING_STANDARDS.md - a comprehensive coding standards document for a project. Use this skill when asked to "document coding standards", "create style guide", "establish conventions", "generate CODING_STANDARDS.md", or any time you need to define or enforce coding practices for a team. Trigger when starting work on a new project that lacks documented standards.
development
Generate or update PROJECT_ARCHITECTURE.md - a comprehensive architectural map for AI context. Use this skill when asked to "map the architecture", "document the project structure", "onboard a new AI", "analyze the codebase", "create context for AI", or any time you need to understand a codebase's architecture. This skill is essential for new project onboarding and should trigger automatically when starting work on unfamiliar projects.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.