The skill guides audits from scoping and checklist review through framework and deployment checks, optional permission-based runtime probes, and severity-ranked reporting. It emphasizes concrete remediation, standards-based references, and avoiding code changes; runtime testing requires explicit permission and must account for possible side effects.
Perform a structured security audit of code, configuration, and architecture. Identify vulnerabilities, rank them by severity, and recommend concrete fixes grounded in OWASP standards, framework-specific best practices, and DevSecOps controls.
This is a read-only analysis. Do not modify code — audit, then report.
/security-audit [scope]full to audit the whole repository for systemic issues.The audit draws on five reference areas. Load the relevant reference file when a finding needs grounding or when you need detailed requirements for a topic:
| Area | Reference | When to load |
|---|---|---|
| OWASP Top 10 | reference/owasp-top-10.md | Classifying a finding against the major vulnerability categories (2021 + 2025) |
| OWASP ASVS | reference/owasp-asvs.md | Deriving concrete security requirements or building a verification checklist |
| OWASP Cheat Sheet Series | reference/owasp-cheat-sheets.md | Needing practical implementation guidance (auth, JWT, file upload, CSRF, password storage) |
| Node.js Security | reference/nodejs-security.md | Auditing Express, NestJS, Fastify, Next.js/serverless handlers, or Node.js dependency/supply-chain issues |
| DevSecOps | reference/devsecops.md | Reviewing CI/CD pipeline security, dependency/container/secret/SAST/DAST scanning |
Use progressive disclosure: keep the reference files unloaded until a finding maps to them. Load only the file the current finding needs.
# Detect the default branch
BASE_BRANCH=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}' || echo main)
# Diff under audit
git diff "$BASE_BRANCH"...HEAD --stat
git diff "$BASE_BRANCH"...HEAD
# Dependency surface
cat package.json 2>/dev/null | jq '.dependencies, .devDependencies'
npm audit --json 2>/dev/null | jq '.metadata.vulnerabilities' 2>/dev/null
# Configuration surface
find . -maxdepth 2 \( -name '*.yml' -o -name '*.yaml' -o -name 'Dockerfile*' -o -name '.env*' \) -not -path './node_modules/*'For a full audit, also enumerate: auth/session code, input handlers, file upload paths, database query construction, crypto usage, CI/CD workflow files, and container definitions.
Completion criteria:
full audits, the additional security-critical code paths are listed.Walk every changed or in-scope file against this checklist. Each item maps to an OWASP Top 10 category — use reference/owasp-top-10.md for the full category definitions and examples.
exec/spawn with user input; uses argument arraysdangerouslySetInnerHTML/v-html/|raw justified and sanitizedreference/owasp-cheat-sheets.md* with credentialscrypto.randomUUID()/crypto.randomBytes() — never Math.random() for securityreference/devsecops.md for secret scanningnpm ci used in CI; lockfile committed; --ignore-scripts consideredreference/owasp-cheat-sheets.mdRequest and return a Response; there is no res.setHeader) — the incompatible call throws whenever it runs, and the error can surface as a stack trace if nothing catches itCompletion criteria:
For Node.js projects, load reference/nodejs-security.md and check framework-specific concerns:
helmet(), express-rate-limit, cors allow-list, no X-Powered-By, body size limits, prototype pollution defensesValidationPipe with whitelist + forbidNonWhitelisted, ClassSerializerInterceptor to strip sensitive fields, Guards for authz, helmet middleware, throttler@fastify/helmet, @fastify/rate-limit, @fastify/cors with origin allow-list, schema validation on routes, @fastify/under-pressureRequest → Response; Pages Router: (req, res)), each handler catches errors and returns a generic 500, unsupported methods return 405npm audit/Snyk/Socket, non-root container user, event-loop blocking (ReDoS, sync APIs), prototype pollutionCompletion criteria:
When the scope includes CI/CD or deployment, load reference/devsecops.md and verify:
Completion criteria:
Some issues appear only in runtime responses or managed-service configuration, not in the diff. When the user names a running instance that they own and permits testing, send a small set of probes, limited to the flows the user names. Never probe production or third-party systems without explicit permission, and never send load, fuzzing, or destructive requests. Some probes change state: signup creates an account, password reset issues a token and sends email, resend-code sends an email or SMS, and MFA attempts can send codes or use up attempt limits. Name these side effects before you run them, use test addresses the user controls, and skip any flow the user did not permit.
Content-Type. Expect a generic error body with no stack trace, file paths, function names, or library versions.curl -s -i -X POST "$TARGET/api" -H 'Content-Type: application/json' --data '{' # malformed JSON
curl -s -i -X PATCH "$TARGET/api" # unsupported methodCompletion criteria:
Rate by real impact and exploitability. When the user or a compliance process uses CVSS, add a CVSS 3.1 (or 4.0) vector to each finding and use its band: Critical 9.0–10.0, High 7.0–8.9, Medium 4.0–6.9, Low 0.1–3.9.
| Level | Criteria | Examples |
|---|---|---|
| 🔴 Critical | Immediate, exploitable risk | SQL injection, RCE, exposed secrets, broken auth |
| 🟠 High | Significant concern, likely exploitable | auth bypass, IDOR, missing authz on sensitive data |
| 🟡 Medium | Potential vulnerability | missing validation, weak crypto, error output that leaks secrets or internal data, account enumeration or stack traces that are easy to trigger without auth (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N scores 5.3; with PR:L it scores 4.3) |
| 🟢 Low | Defense-in-depth improvement | the same leaks when exploitation is harder (AC:H: 3.7 with PR:N, 3.1 with PR:L), missing security header, better logging |
| ℹ️ Info | Awareness note | version end-of-life, future hardening |
## Executive Summary
- Overall posture: Secure / Needs attention / Critical issues
- N findings: 🔴 x 🟠 x 🟡 x 🟢 x ℹ️ x
- Top recommendations (ordered by impact)
## Findings
### [Severity] Title
- **OWASP**: A03:2021-Injection (and A05:2025 if reclassified)
- **CVSS** (optional): `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H` (9.8)
- **Location**: `src/api/upload.ts:42`
- **Issue**: One-line description
- **Impact**: What an attacker can do
- **Recommendation**: Concrete fix with code snippet or config change
- **Reference**: OWASP Cheat Sheet — File Upload; ASVS v5.0.0-5.2.1
## Positive Practices
- Well-implemented controls worth keepingCite the relevant OWASP category, ASVS requirement ID (e.g. v5.0.0-6.2.3), and Cheat Sheet in each finding so the recommendation is traceable to a standard.
Completion criteria:
git diff, npm audit, cat, grep, and the permitted probes in step 5, which can change state). If your environment provides an execute() wrapper, prefer it for read-only command execution.reference/owasp-top-10.md).jellydn/my-ai-tools
1524f4a
gitgit remotegit remote showgit diffgrepawkechocatjqnpmnpm auditnpm cifindcurlAlso appears in
since Nov 30, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.