security-vulnerability-scan
Skill2 starsChanged 5 months agoMITView on GitHub
Security vulnerability scanner for any application (static source only — for a running or deployed URL use live-app-security-audit). Use proactively whenever the user asks to perform a security review, scan for vulnerabilities, harden security, check for OWASP issues, find hardcoded secrets, review dependencies for known CVEs, or assess security risk. Triggers on phrases like security review, vulnerability scan, OWASP, CVE, improve security, find secrets, harden app, audit deps, and static/code-level pentest or threat model. If the working directory is empty, ask for a GitHub URL and clone with gh before analyzing. Aligned to OWASP Top 10:2025. Writes a structured report to audit/YYYY-MM-DD/report.md in the project root.
- Pipes a download into a shell
- Reads credentials
- Deletes or force-pushes
- Installs packages
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- skill-creatorSkill
- anti-sycophancySkill
- clear-and-shortSkill
- coding-standardsSkill
- convert-plan-to-featureSkill
- dead-code-removalSkill
- delegation-promptSkill
- document-generateSkill
- execute-changeSkill
- live-app-security-auditSkill
- new-featureSkill
- plan-eng-reviewSkill
- pr-review-requestSkill
- pr-reviewSkill
- repo-change-summarySkill
- session-cleanupSkill
- session-handoffSkill
- sonar-issue-checkSkill
- sonar-issue-fixSkill
- systematic-debuggingSkill
- trim-initial-bundleSkill
- unslopSkill
- update-dependenciesSkill
- verify-frontend-changeSkill
- verify-implementationSkill
- windows-disk-cleanupSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 8 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Check for telltale project files — use Glob to look for any of: package.json, pyproject.toml, requirements.txt, go.mod, pom.xml, …
- Distinctive: line 41
If blank: ask the user for a GitHub URL.
- Very specific: line 116
Default credentials in configs: admin:admin, root:root, password=changeme.
- Distinctive: line 177
No CAPTCHA / anti-automation on password reset, registration, MFA challenge.
- Very specific: line 184
No abuse-case tests — search for tests named should_reject_, unauthenticated_, forbidden_, denies_.
- Very specific: line 199
No rate limit on login/reset/MFA endpoints.
- Distinctive: line 201
Default/well-known passwords in seed data, fixtures, or examples that may be copy-pasted to prod.
- Very specific: line 223
No structured logger in the project (no winston/pino/bunyan, no python logging setup, no Serilog) — or only console.log in server code.
- Distinctive: line 226
No centralized error handler / no request-ID correlation.
- Very specific: line 227
No audit trail for high-value actions (role change, payment, data export) — look for INSERT INTO audit_log or equivalent on critical write …
- Very specific: line 228
No retention policy / no log shipping config (no fluentbit, vector, filebeat, no Datadog/Splunk/CloudWatch agent config).
- Very specific: line 289
Use git rev-parse --show-toplevel if inside a repo.
- Very specific: line 321
Write via the Write tool with this exact skeleton:
- Distinctive: line 384
Use this skill for: every PR review, periodic full-repo sweeps, "is there anything obvious," initial onboarding to an unfamiliar codebase.
- Distinctive: line 406
Be conservative on severity: When in doubt, mark Medium and let the human re-rank.
- Very specific: line 407
One finding per issue: Don't bundle "weak crypto in auth.ts:10, auth.ts:42, auth.ts:88" into one item — they're separate finds with …
- Distinctive: line 408
Cite file:line in every finding: No exceptions. A finding without a location is unactionable.
- Distinctive: line 410
No false-positive bait: If a grep hit is in a test file mocking the unsafe pattern intentionally, omit it (or mark Low with "test file — …
- Very specific: line 411
Re-fetch references on demand: When triaging a specific A0X finding, read the matching references/A0X_2025-*.md to ground the remediation …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
security-vulnerability-scan
OWASP Top 10:2025-aligned vulnerability scanner for any codebase. Static-only (no source files modified); produces a persisted Markdown report under audit/<YYYY-MM-DD>/report.md in the project root and echoes the path back to the user.
When I Activate
Trigger proactively — do not wait for the literal phrase "use the security-vulnerability-scan skill." The frontmatter description already enumerates the trigger phrases; the only rule to add here is the bias: when in doubt about whether a request is asking for a security review, trigger. Overtriggering is cheap; missing a real security review is expensive.
Read/Write Contract
- Read the project freely: source files, configs, lockfiles, manifests.
- Write exactly one location:
<project root>/audit/<YYYY-MM-DD>/report.md(or a timestamped variant if it already exists). - Never modify source files, configs, dependencies, lockfiles,
.gitignore,.env*, or anything outsideaudit/. - No outbound network calls are required after Step 0 (clone) completes. Optional dependency-audit shell calls (
npm audit,pip-audit, …) require network and exec — mark them as skipped in sandboxed environments.
Step 0 — Bootstrap Decision
Determine whether the working directory already contains a project, or is blank and needs a clone.
Check for telltale project files — use Glob to look for any of: package.json, pyproject.toml, requirements.txt, go.mod, pom.xml, build.gradle, Gemfile, Cargo.toml, composer.json, *.csproj, *.sln, Dockerfile, *.tf.
If populated: skip to Step 1.
If blank: ask the user for a GitHub URL. Then clone:
gh repo clone <url> . # preferred — uses gh auth
# fallback if gh unavailable:
git clone <url> .Re-run the populated check and proceed to Step 1. If both clone commands fail, stop and report the error verbatim; do not improvise.
Step 1 — Recon
Identify the stack so subsequent checks are framework-aware.
| Signal | Detect via | What it tells you |
package.json | Read | Node/JS; check dependencies for express/fastify/koa/next/nest, react/vue/svelte |
pyproject.toml, requirements.txt, Pipfile | Read | Python; check for django/flask/fastapi |
go.mod | Read | Go; framework is in imports (gin/echo/fiber/chi) |
pom.xml, build.gradle, build.gradle.kts | Read | Java/Kotlin; spring-boot/quarkus |
Gemfile | Read | Ruby; rails/sinatra |
Cargo.toml | Read | Rust; actix-web/axum/rocket |
composer.json | Read | PHP; laravel/symfony |
*.csproj, *.sln | Glob+Read | .NET; aspnetcore version |
Dockerfile, docker-compose.yml | Read | Runtime base images; exposed ports; build steps |
.github/workflows/*.yml, .gitlab-ci.yml, bitbucket-pipelines.yml | Glob+Read | CI/CD posture for A03/A08 |
terraform/, *.tf, cdk.json, pulumi.yaml | Glob | IaC for A02 misconfig |
.env*, config/*.{yml,yaml,json,toml} | Glob | Configuration surface, secret leak risk |
Capture: language(s), web framework(s), DB driver(s), auth library, runtime image, CI provider, package manager. Use this profile to prioritize Step 4 framework checks.
Step 2 — OWASP Top 10:2025 Static Scan
One short scan section per category. Each section ends with a pointer to the reference file, which you load on demand only when triaging a specific finding in that category.
How to run these pattern sets
Scope every set to the Step 1 recon profile. Run only the patterns whose language / framework Step 1 actually detected — a Python-only repo needs no req.body, Sequelize, or Express regexes; a Go repo needs no hashlib.md5(. On a polyglot repo, run the set for each detected language. Language-independent rows (A02 container and IaC checks, A03 lockfiles and registries, A08 CI workflows) always run regardless of profile.
One ripgrep call per category — not one Grep call per regex. Batch a category's patterns into a single rg invocation with one -e per pattern, run via Bash. That turns Steps 2 and 3 into roughly 10–12 calls instead of roughly 60. Keep the batching per category so every hit stays attributable to the category you are triaging, and keep -n so every hit carries its line number:
# A04 — Cryptographic Failures: one call, one -e per pattern
rg -n --no-heading \
-e 'hashlib\.(md5|sha1)\(' \
-e '\b(DES|3DES|RC4|ECB)\b' \
-e 'Math\.random\(\)' \
-e 'rejectUnauthorized:\s*false' \
-e 'verify=False' \
-e 'InsecureSkipVerify:\s*true'Add -i for the case-insensitive sets, and -g when a category is file-type-scoped (-g '*.tf' for the Terraform rows, -g '.github/workflows/*' for the Actions rows). A call that returns nothing means that category is clean — record it and move on; do not re-run its patterns one at a time.
Committed generated and minified files. ripgrep honors .gitignore, which does not cover generated or vendored output that is committed: *.min.js, *.bundle.js, *.generated.*, dist/, build/, vendor/, third_party/. Treat hits in those paths as note-and-down-rank, never silently exclude — a real credential committed inside a .min.js is a genuine finding, and the report must say the hit came from a generated file rather than pretend it was never seen. Same discipline as test files: a hit in a test mocking the unsafe pattern stays informational (Low, "test file — informational only"), never dropped without a trace.
A01:2025 — Broken Access Control
Grep targets (Node/Python/Go syntaxes shown; adapt to stack):
- Missing auth middleware on routes:
app\.(get|post|put|delete|patch)\s*\(without anauthenticate/authorize/requireAuth-style guard nearby. - IDOR risk: queries by primary key that don't scope to the session user:
findByPk\(req\.(params|body|query)\.id\),WHERE id\s*=\s*\$\{without a tenant/user filter. - Mass assignment:
req\.bodyspread into a modelUser.create({...req.body}),User.update(req.body). - Path traversal:
path.join/fs.read/open(with unsanitized user input. Look for..allowed in supplied paths. - CORS wildcard with credentials:
Access-Control-Allow-Origin:\s*\*next toAccess-Control-Allow-Credentials:\s*true. - JWT
alg: noneaccepted, JWT decode without verify, JWT secret hard-coded. - Hidden admin/debug routes: grep for
/admin,/debug,/internal,/__and check guard presence.
For full guidance (description, prevention, attack scenarios, mapped CWEs), read
references/A01_2025-Broken_Access_Control.mdbefore recommending fixes.
A02:2025 — Security Misconfiguration
Grep / file checks:
- Debug/verbose error pages in prod:
DEBUG\s*=\s*True,app.debug = True,NODE_ENVdefaulting to development. - Default credentials in configs:
admin:admin,root:root,password=changeme. - Permissive CORS, missing Helmet/
helmet(), missing security headers (Strict-Transport-Security,Content-Security-Policy,X-Content-Type-Options,Referrer-Policy,Permissions-Policy). - Open S3/GCS buckets:
acl: public-read,BucketAccessControl.PUBLIC_READ,iam.PublicAccessPrevention: inherited. - Container hygiene:
FROM .*:latest,USER rootleft in final stage,apt-get installwithout--no-install-recommends, missingrm -rf /var/lib/apt/lists/*. - Docker-compose with ports
0.0.0.0:bound to dev-only services. - Terraform/CDK:
0.0.0.0/0ingress rules, public RDS, unencrypted S3. - Sample apps /
/swagger,/api-docs,/graphqlexposed without auth in non-dev.
For full guidance, read
references/A02_2025-Security_Misconfiguration.md.
A03:2025 — Software Supply Chain Failures
Lockfile + dependency checks:
- Confirm a lockfile exists:
package-lock.json,yarn.lock,pnpm-lock.yaml,poetry.lock,Pipfile.lock,go.sum,Gemfile.lock,Cargo.lock. No lockfile is itself a finding. - Known-vulnerable packages: run if available —
npm audit --json,pip-audit -f json,bundle audit,cargo audit,govulncheck ./...,osv-scanner -r .. Mark as skipped if exec/network is forbidden. - GitHub Actions pinning: grep workflows for
uses:\s*[\w/-]+@v?\d+(tag-pinned) vsuses:\s*[\w/-]+@[0-9a-f]{40}(SHA-pinned). Tag-pinned third-party actions are findings. - Registry trust:
.npmrc/pip.conf/.cargo/config.tomlreferencing unknown registries. - Auto-update without signature: code that downloads + runs binaries (
curl ... | shin Dockerfile/CI scripts). - Direct fetches from
raw.githubusercontent.comorgist.github.comin build scripts. - SBOM presence: any
sbom.json,bom.xml,*.cdx.json,*.spdx.json. Absence is a finding.
For full guidance, read
references/A03_2025-Software_Supply_Chain_Failures.md.
A04:2025 — Cryptographic Failures
Grep targets:
- Weak hashes for security:
\b(md5|sha1)\b,crypto.createHash\(['"](md5|sha1)['"]\),hashlib\.(md5|sha1)\(. - Weak ciphers:
\b(DES|3DES|RC4|ECB)\b,Cipher\.getInstance\(['"](DES|RC4|.*ECB)['"]\),crypto.createCipher\((deprecated; no IV). - Bad randomness for security:
Math\.random\(\),rand\(\),random\.random\(\),new Random\(\)— flag near token/password-reset/CSRF generation. - Cert validation disabled:
rejectUnauthorized:\s*false,verify=False,InsecureSkipVerify:\s*true,ServicePointManager\.ServerCertificateValidationCallback. - Hard-coded keys / IVs / secrets:
(?i)(secret|key|password|token|api[_-]?key)\s*[:=]\s*['"][^'"]{8,}['"]. - Plain HTTP:
http://URLs to internal services in non-localhost contexts. - TLS downgrades:
TLSv1\b,SSLv3, ciphersuite strings allowing:RC4:or:NULL:. - Password storage without KDF:
bcrypt/scrypt/argon2/pbkdf2absent and passwords being hashed with bare SHA-* or stored plain. - AES-GCM nonce reuse risk:
createCipheriv\('aes-...-gcm', key, iv)whereivis constant or counter-derived from a recycled source.
For full guidance, read
references/A04_2025-Cryptographic_Failures.md.
A05:2025 — Injection
Grep targets:
- SQL string concatenation / template-literal interpolation:
(query|execute|raw)\s*\(\s*['"\][^'"`]${,'\s+\sreq.,f"SELECT . {,String.format(.*SELECT`. - ORM raw escapes:
sequelize\.literal\(,Sequelize\.QueryTypes\.RAW,Model\.findAll\(\{\s*where:\s*\[,db\.execute\(". - NoSQL:
req\.body\.\w+passed directly tofind/findOnewithout shape validation;where:\s*\{[^}]*\$nepatterns in user-controlled input. - Shell injection:
exec\(/execSync\(with concatenation;spawn\(.*,\s*{\s*shell:\s*true;os.system\(,subprocess\..*shell=True,Runtime\.exec. - XSS:
dangerouslySetInnerHTML,v-html,\|safe,Element\.innerHTML\s*=,document\.write\(, server templates with{!! !!}/<%== %>on user data. - SSTI:
Template\(.*\+,render_template_string\(,eval\(.*req\.. - LDAP injection: filter string concatenation with user input.
- Eval/dynamic code:
eval\(,new Function\(,setTimeout\(string,vm\.runInNewContext\(. - LLM/agent context (2025): tool outputs / fetched docs / RAG context passed verbatim into prompts without separation.
For full guidance, read
references/A05_2025-Injection.md.
A06:2025 — Insecure Design
Static signals (these often need a brief design read, not just grep):
- Login endpoint without rate limiting middleware (
express-rate-limit,flask-limiter,django-ratelimit, gateway-level limit). - No CAPTCHA / anti-automation on password reset, registration, MFA challenge.
- Workflow endpoints without server-side state checks (e.g.,
/order/confirmaccepts any order ID without re-checking payment state). - Server-trusted client-computed values:
req.body.total,req.body.role,req.body.discountwritten to DB without recomputation. - Single-tenant query patterns in a multi-tenant schema: any
Model.findAll()/SELECT * FROM tablewithoutWHERE tenant_id =in code that handles tenant data. - URL fetchers that accept arbitrary destinations:
axios.get(req.body.url),fetch(userInput)with no allow-list / metadata-IP block. - File uploads without type/size/storage-path enforcement.
- Recursive parsers / regex without complexity bounds (ReDoS risk).
- No abuse-case tests — search for tests named
should_reject_,unauthenticated_,forbidden_,denies_. Sparse coverage is a finding.
For full guidance, read
references/A06_2025-Insecure_Design.md.
A07:2025 — Authentication Failures
Grep targets:
- Missing MFA enforcement on admin/privileged routes.
- Hard-coded credentials in source:
password\s*=\s*['"][^'"]+['"],Authorization:\s*Basic\s+[A-Za-z0-9+/=]+in code or configs. - Session ID in URL:
req\.query\.session,?token=patterns,sessionidin redirect URLs. - Session not rotated on login: look for session-store
set/saveafter auth without a priorregenerate/rotate. - JWT without revocation: any JWT issuance code with no corresponding blocklist / refresh-token rotation.
- Weak password policy / no breached-password check: registration handler that accepts any non-empty password.
- Username enumeration: differing responses on login/reset/register for "user exists" vs "user does not exist."
- No rate limit on login/reset/MFA endpoints.
- OAuth/OIDC issues:
redirect_uriparsed from request and used without allow-list check;stateparameter missing;alg: noneaccepted on ID tokens. - Default/well-known passwords in seed data, fixtures, or examples that may be copy-pasted to prod.
For full guidance, read
references/A07_2025-Authentication_Failures.md.
A08:2025 — Software or Data Integrity Failures
Grep targets:
- Insecure deserialization:
pickle\.loads\(,yaml\.load\((withoutSafeLoader),ObjectInputStream,BinaryFormatter,unserialize\(,Marshal\.load\(. - Auto-update without signature verification: code that downloads + executes/installs without checksum or signature check.
- Signed cookie/token verification missing or weak: JWT decoded without
verify;cookie-parserwithoutsigned: true; HMAC compare with==instead of constant-time. - CI workflows running on untrusted PRs with secrets:
pull_request_target+ checkout of PR head + access to${{ secrets.* }}. - Plugin/extension loading from disk or URL without signature:
require(userPath),import(userModule),Assembly.LoadFrom(file). - Mutable third-party actions/images:
:latesttags, branch refs inuses:lines. - Missing SBOM/provenance artifacts in release pipeline.
For full guidance, read
references/A08_2025-Software_or_Data_Integrity_Failures.md.
A09:2025 — Security Logging and Alerting Failures
Static-only signals (this category requires runtime context — flag gaps but defer depth to the agent):
- No structured logger in the project (no winston/pino/bunyan, no python
loggingsetup, no Serilog) — or onlyconsole.login server code. - Auth events not logged: search
authenticate/authorizepaths for log calls on failure. - Sensitive data logged: log calls that include
password,token,secret,creditCard,ssn, full request body, full headers. - No centralized error handler / no request-ID correlation.
- No audit trail for high-value actions (role change, payment, data export) — look for
INSERT INTO audit_logor equivalent on critical write paths. - No retention policy / no log shipping config (no
fluentbit,vector,filebeat, no Datadog/Splunk/CloudWatch agent config).
For full guidance, read
references/A09_2025-Security_Logging_and_Alerting_Failures.md.
A10:2025 — Mishandling of Exceptional Conditions
Grep targets:
- Silent exception swallowing:
catch\s*\(\s*\w*\s*\)\s*\{\s*\},except[^:]*:\s*pass,catch\s*\(_?\)\s*=>\s*\{\s*\},try { ... } catch { /* ignore */ }. - Generic catches around security calls:
catch (Exception)/except Exception:wrappingauthorize,verify,validate,check*calls. - Fail-open patterns: catch blocks that set a permission/role/allowed flag to
trueor returntrueon error. - Stack-trace responses: error middleware that sends
err.stackorerr.messageto clients in non-dev mode. - Unhandled async rejections:
asyncroute handlers in Express 4 withoutexpress-async-errorsor try/catch — flag anyasync (req, res) =>without an error catcher. - Transaction without rollback on error:
BEGIN/commitwithout a matching rollback in the catch. - Different status codes/messages between "exists" and "not found" branches on auth-adjacent endpoints (enumeration via error).
- TOCTOU patterns:
if (fs.exists) { ... fs.read }— separated check and use.
For full guidance, read
references/A10_2025-Mishandling_of_Exceptional_Conditions.md.
Step 3 — Secret Scan
Walk .env*, config/, secrets/, *.yml/*.yaml, *.json, *.tf, *.properties, source files. Grep patterns:
| Secret class | Regex (anchor to ensure context) | ||||
| AWS access key | AKIA[0-9A-Z]{16} | ||||
| AWS temporary / assumed-role key | ASIA[0-9A-Z]{16} | ||||
| AWS secret key | [A-Za-z0-9/+=]{40} near aws_secret_access_key / AWS_SECRET_ACCESS_KEY | ||||
| GCP service-account key | "type":\s*"service_account", "private_key":\s*"-----BEGIN PRIVATE KEY----- | ||||
| GitHub PAT (classic) | ghp_[A-Za-z0-9]{36} | ||||
| GitHub fine-grained PAT | github_pat_[A-Za-z0-9_]{82} | ||||
| GitLab PAT | glpat-[A-Za-z0-9_-]{20,} | ||||
| Slack token | xox[abcdeprs]-[A-Za-z0-9-]{10,} | ||||
| Slack app-level token | xapp-[A-Za-z0-9-]{10,} | ||||
| Stripe live key | sk_live_[A-Za-z0-9]{24,} | ||||
| Stripe org-scoped key | sk_org_[A-Za-z0-9]{24,} | ||||
| Stripe restricted | rk_live_[A-Za-z0-9]{24,} | ||||
| Anthropic API key | sk-ant-[A-Za-z0-9_-]{32,} | ||||
| npm access token | npm_[A-Za-z0-9]{36} | ||||
| Supabase secret key | sb_secret_[A-Za-z0-9]{40,} | ||||
| Supabase publishable key | sb_publishable_[A-Za-z0-9]{40,} | ||||
| Twilio account SID | AC[a-f0-9]{32} | ||||
| Generic JWT | eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+ | ||||
| RSA / EC private key | `-----BEGIN (RSA | EC | OPENSSH | DSA | )PRIVATE KEY-----` |
| Connection string | (postgres|mysql|mongodb|redis)://[^@/]+:[^@/]+@ | ||||
| Generic high-entropy assignment | (?i)(secret|password|token|api[_-]?key)\s*[:=]\s*['"][A-Za-z0-9+/=_-]{16,}['"] |
Run this whole table as one ripgrep call (rg -n --no-heading -e '<row 1>' -e '<row 2>' …), not one Grep call per row — see "How to run these pattern sets" under Step 2. The \| in the rows above is Markdown table-escaping: replace each with a bare | when pasting a pattern into -e, or the alternation silently becomes a literal pipe. The generated-file rule applies here too and matters most in this step: a secret committed inside a *.min.js or dist/ artifact is a real leak, so note the hit and mark its origin, never drop it.
For each match: record file:line, redact the middle of the value in the report (AKIA…REDACTED…XYZW), and flag whether the file is committed to git (git log --all --diff-filter=A -- <path>). Committed secrets require a separate remediation note ("rotate immediately + purge history").
Recommend gitleaks detect --no-banner or trufflehog filesystem . as deeper follow-ups if available.
Step 4 — Framework-Aware Checks
Detect the web framework(s) during Step 1 recon, then read only the matching section(s) of references/framework-checks.md and apply that checklist. Typically only 1–2 frameworks apply per run — skip the sections that don't match the recon profile.
Step 5 — Report Output
Determine project root
Use git rev-parse --show-toplevel if inside a repo; otherwise the working directory at scan time. Treat that path as <project_root>.
Choose the report path (ISO date; collision-safe)
DATE=$(date +%Y-%m-%d)
DIR="<project_root>/audit/${DATE}"
mkdir -p "$DIR"
FILE="${DIR}/report.md"
if [ -e "$FILE" ]; then
TIME=$(date +%H%M%S)
FILE="${DIR}/report-${TIME}.md"
fiWindows / PowerShell equivalent:
$date = Get-Date -Format 'yyyy-MM-dd'
$dir = Join-Path $projectRoot "audit\$date"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$file = Join-Path $dir 'report.md'
if (Test-Path $file) {
$time = Get-Date -Format 'HHmmss'
$file = Join-Path $dir "report-$time.md"
}The first scan of the day writes report.md; subsequent scans the same day write report-HHMMSS.md. History is preserved; nothing is overwritten.
Report structure
Write via the Write tool with this exact skeleton:
# Security Assessment — <project name> — <YYYY-MM-DD>
## Summary
- **Overall risk:** Critical | High | Medium | Low
- **Scan time:** <timestamp>
- **Stack:** <languages, frameworks, runtimes from Step 1>
- **Attack surface:** <public endpoints, authn surface, data classes>
- **Components reviewed:** <directories / files in scope>
- **Findings:** N Critical / N High / N Medium / N Low
## Findings
### Critical
#### SEC-001 — <short title>
- **OWASP:** A0X:2025 <Category>
- **CWE:** CWE-NNN
- **Location:** `path/to/file.ts:42`
- **Description:** <what the issue is, in plain language>
- **Attack scenario:** <how an attacker exploits this in practice>
- **Remediation:** <how to fix; include a code-level diff sketch when possible>
- **References:** [OWASP A0X:2025 — \<Title\>](https://owasp.org/Top10/2025/A0X_2025-<Title>/)
### High
### Medium
### Low
## Prioritized Remediation
1. <Critical-1 — one-line action>
2. <Critical-2 — one-line action>
3. <High-1 — one-line action>
…
## Recommended Follow-ups
- **Deep manual review:** spawn a security-focused review agent if one is available (e.g. a project-defined `security-auditor`) on the top N findings for adversarial validation.
- **Secret scanning:** run `gitleaks detect --no-banner` and `trufflehog filesystem .` to confirm Step 3 coverage.
- **Dependency CVEs:** run the language-appropriate auditor (`npm audit`, `pip-audit`, `cargo audit`, `govulncheck`, …) — re-include in CI if not already.
- **Container scan:** `trivy fs .` or `grype dir:.` for OS-package + dependency CVEs in built images.
- **DAST:** schedule an OWASP ZAP / Burp scan against a staging deployment.Severity rubric
Apply consistently — these are the only allowed labels.
- Critical — unauthenticated remote code execution, public exfiltration of secrets/PII at scale, privilege escalation to admin from anonymous, complete authentication bypass.
- High — authenticated RCE, IDOR exposing other users' sensitive data, missing auth on sensitive endpoints, hard-coded credentials in a committed file, weak password hashing in production code.
- Medium — XSS in non-admin contexts, CSRF on state-changing endpoints, missing security headers, weak TLS configuration, dependency CVEs with known PoCs but limited blast radius.
- Low — verbose error pages, missing rate limits without immediate abuse path, defense-in-depth gaps, missing audit logging on non-critical actions.
After writing
- Echo the absolute path of the report file back to the user in chat.
- Surface the top 3 highest-severity findings as a one-line preview each.
- Suggest the user add
audit/to.gitignoreif they don't want reports tracked in git. Do not modify.gitignore— surface the suggestion only.
Escalating to a security-review agent
This skill produces a fast, broad, automatic first pass. A security-focused review agent, if one is available (e.g. a project-defined security-auditor), produces a deep, adversarial, manual review of specific surfaces.
- Use this skill for: every PR review, periodic full-repo sweeps, "is there anything obvious," initial onboarding to an unfamiliar codebase.
- Escalate to a security-focused review agent if one is available (e.g. a project-defined
security-auditor) when: a Critical/High finding needs validation; a sensitive surface (auth, payment, crypto, multi-tenant data) needs design-level review; the codebase touches a regulated domain (HIPAA, PCI, GDPR).
The recommended workflow: run this skill → user picks the 3–5 highest-impact findings → spawn a security-focused review agent if one is available (e.g. a project-defined security-auditor) to drill in.
Relationship with live-app-security-audit
This skill is static-only — it reads the source tree but never touches a running app. If the user has a deployed instance of this codebase, run live-app-security-audit alongside this scan for full coverage. The two skills target distinct surfaces:
- This skill finds: hard-coded secrets in source, missing auth middleware in code, weak crypto choices, dependency CVEs, IaC misconfig, dangerous patterns in the codebase.
live-app-security-auditfinds: secrets that ended up baked into the deployed JS bundle, missing security headers / weak TLS at the edge, unauthenticated endpoints in production, tokens inlocalStorage, missing login rate-limiting, account-enumeration on password-reset flows.
Recommended workflow when the user asks for a generic "security audit": run both — this one on the source repo, live-app-security-audit on the deployed URL. Reports land side-by-side under audit/<YYYY-MM-DD>/ (report.md + live-audit.md).
Sandboxing Compatibility
- Step 0 clone requires network + exec — skip in a strict sandbox; ask the user to clone manually or run outside the sandbox.
- Dependency auditors (
npm audit,pip-audit,cargo audit,govulncheck,trivy, …) require network and/or subprocess. If a call fails with permission or network error, mark the section as "Skipped — sandbox" in the report and continue with static analysis only. - Static checks (Step 1–4) are pure file reads + greps; they work in any sandbox. Step 5 additionally needs Bash (
mkdir/date) + Write to persist the report.
Best Practices
- Be conservative on severity. When in doubt, mark Medium and let the human re-rank. Inflated criticals destroy trust.
- One finding per issue. Don't bundle "weak crypto in
auth.ts:10,auth.ts:42,auth.ts:88" into one item — they're separate finds with separate fixes. - Cite file:line in every finding. No exceptions. A finding without a location is unactionable.
- Don't propose code edits in the report body. The report is read-only context; the user/agent applies fixes deliberately afterward.
- No false-positive bait. If a grep hit is in a test file mocking the unsafe pattern intentionally, omit it (or mark Low with "test file — informational only").
- Re-fetch references on demand. When triaging a specific A0X finding, read the matching
references/A0X_2025-*.mdto ground the remediation language in OWASP terms.
Related Tools
live-app-security-audit— the runtime counterpart in this repo. Run alongside whenever a deployed instance is available.- Security-review agent — deep, manual security review of specific surfaces; use a project-defined
security-auditoragent if one is available. gitleaks/trufflehog— secret-scanning beyond the regexes in Step 3.semgrep/CodeQL— pattern-based static analysis with curated rule packs.trivy/grype/osv-scanner— vulnerability scanners for dependencies and container images.- OWASP ZAP / Burp Suite — DAST against a running staging environment.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

