ai-security-audit
Skill0 starsChanged 16 days agoMITView on GitHub
General-purpose, evidence-driven security audit of a software repository. Reconnaissance and stack detection, trust-boundary mapping, adaptive audit planning, per-category hunting, independent adversarial validation, a coverage ledger, structured findings (JSON-schema validated) and markdown reports, plus re-audit support. Use when asked to "audit the security of this repo/project/application", "find vulnerabilities", "review this code from a security perspective", or before a release when a security review is requested. Authorized security testing only.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ahmedibm9-cyber/VibeGuardtheir own version, first seen Oct 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ahmedibm9-cyber/VibeGuard★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- security-ai-llmSkill
- security-apiSkill
- security-reconSkill
- security-secretsSkill
- security-supply-chainSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 8 are distinctive, and 8 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.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Prime directive: never classify code as a confirmed vulnerability merely because it looks suspicious.
- Very specific: line 59
Read stack.json and sanity-check it against the repository.
- Very specific: line 62
Do not assume the stack; verify with your own eyes on key files (package.json, requirements.txt, route definitions, Dockerfile).
- Very specific: line 67
Write .audit/threat-model.json with this structure:
- Distinctive: line 105
Threat model first: Before filing anything, state who the attacker is, what they control, and which boundary they cross.
- Distinctive: line 122
One root cause, one finding: If three routes share the same missing guard, file one finding listing all three.
- Very specific: line 150
Write .audit/coverage-ledger.json per schemas/coverage.schema.json.
- Very specific: line 151
Every category selected in the plan appears exactly once, with an honest status: complete, partial, not_applicable, blocked, or …
- Distinctive: line 180
After fixes are applied, re-run:
- Very specific: line 200
Every finding must contain: exact file(s) and line(s).
- Very specific: line 213
Document the reasoning in severity_reasoning.
- Distinctive: line 219
Do not inflate the finding count to look thorough.
- Very specific: line 220
Do not file "hardening suggestions" as vulnerabilities (use informational severity sparingly, with evidence).
- Distinctive: line 222
Do not chain hypothetical exploits through code that does not exist.
- Distinctive: line 223
Do not edit schemas or the CLI to accept invalid findings.
- Distinctive: line 224
Do not run destructive commands against the target or anything else.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
AI Security Audit
You are running a multi-phase security audit on a repository. Your product is evidence, not vulnerability count. A report with zero confirmed findings is a fine outcome if the audit was genuine. Every finding you file must survive an adversarial validator whose only job is to disprove it.
Prime directive: never classify code as a confirmed vulnerability merely because it looks suspicious. Suspicion starts a candidate; evidence and independent validation make it confirmed.
Safety: this skill is for authorized security testing of repositories you own or are permitted to test. Never attack systems outside the target, never exfiltrate real secrets or user data, prefer static analysis and local, non-destructive PoCs. Redact every secret in every artifact.
Phase 0 — Setup
security-audit audit <target> --output .auditThis writes .audit/stack.json, .audit/audit-plan.json and
.audit/RUN-INSTRUCTIONS.md. If the CLI is unavailable, run the phases
manually; the plan builder logic is described in lib/plan.js and the
categories in lib/categories.js.
Artifacts live in the output directory:
| File | Written by | Purpose |
stack.json | recon script | Detected languages, frameworks, infra |
audit-plan.json | recon script | Selected/excluded categories + reasons |
threat-model.json | audit agent | Trust boundaries and entry points (Phase 2) |
findings.json | hunters + validator | All findings in all statuses |
coverage-ledger.json | audit agent | What was examined, honestly |
validation-report.json | CLI | Mechanical validation results |
REPORT.md etc. | CLI | Human-readable reports |
Focused skill entrypoints
For a deliberately scoped review, the repository also provides discoverable skills under skills/: security-recon, security-api, security-ai-llm, security-secrets, and security-supply-chain. The catalog is in skills/README.md. These focused entrypoints inherit this document's evidence standard, authorized-use restrictions, and anti-false-positive rules; they must not imply that unexamined categories were audited.
Phase 1 — Reconnaissance (done, verify it)
Read stack.json and sanity-check it against the repository. The detector is
heuristic: if it missed a framework you can see (e.g. a Django app detected
only as "python"), note it in threat-model.json and adjust the plan.
Do not assume the stack; verify with your own eyes on key files
(package.json, requirements.txt, route definitions, Dockerfile).
Phase 2 — Architecture, trust boundaries, threat model
Write .audit/threat-model.json with this structure:
{
"architecture_summary": "…",
"actors": [
{ "name": "anonymous", "can_control": "…", "cannot": "…" },
{ "name": "authenticated-user", "can_control": "…", "cannot": "…" },
{ "name": "admin", "can_control": "…", "cannot": "…" }
],
"trust_boundaries": [
{ "name": "browser → server", "crossings": ["HTTP request body", "headers", "cookies"] },
{ "name": "server → database", "crossings": ["parameterized queries"] },
{ "name": "external-service → server", "crossings": ["webhook POST /api/webhooks/stripe"] }
],
"entry_points": [
{ "location": "src/routes/*.ts", "kind": "http", "auth": "session cookie", "notes": "…" }
],
"domain": "e-commerce | saas | api | agent | cli | library | …",
"key_questions": [
"What can an untrusted actor control?",
"What security-sensitive operation can that input eventually influence?"
]
}The two key_questions drive every hunt. Every candidate finding must be able
to answer both, concretely, with file/line evidence.
Phase 3 — Adaptive hunting
For each selected category in audit-plan.json, run a hunting session
following the playbook in agents/<category>.md. The playbooks contain:
what to look for, where to look for this category, evidence requirements,
and explicit false-positive traps for that category.
Hard rules for hunters:
- Threat model first. Before filing anything, state who the attacker is, what they control, and which boundary they cross. If you cannot state it, you do not have a finding — you have a code-style note.
- Trace the flow. A finding must connect untrusted input to a
security-sensitive operation through real code. Record the chain as
data_flowsteps with file:line at each hop. - No category-name findings. "The auth may be flawed" is banned. Name the
exact weakness: e.g. "PUT /api/users/:id accepts
rolefrom the request body and persists it without an admin check". - Check the control before claiming it is missing. Middleware, guards, ORM layers, route-level wrappers, and deploy config can all neutralize a pattern that looks dangerous in isolation. If a control exists, the pattern is not a finding.
- Hunt, do not reformat. You are attacking the code, not reviewing style. But you file only what crosses a trust boundary.
- Respect scope. Files that are examples, tests, fixtures, or docs are out of scope unless they ship to production. Note them in coverage instead.
- One root cause, one finding. If three routes share the same missing guard, file one finding listing all three; do not file three.
Phase 4 — Independent validation
Validation is a separate pass from hunting, ideally a separate agent
session with fresh context. Give the validator: the candidate finding, the
cited source excerpts, and the threat model — but not the hunter's reasoning.
The validator's protocol is in validation/finding-validator.md; supporting
material in validation/exploitability.md and validation/false-positive-analysis.md.
The validator's job is to disprove each candidate:
- Is the attack path real end-to-end, through actual code?
- Can the stated attacker actually reach the entry point?
- Is the attacker genuinely untrusted at that boundary?
- Is the control truly missing, or just elsewhere (middleware, DB constraint, deploy config)?
- Is the impact real for this application's domain?
Outcomes: CONFIRMED (status → confirmed), NEEDS_VALIDATION (real-looking
but unproven — e.g. needs runtime access), REJECTED (disproven; keep it in
findings.json with the rejection reason).
A validator may never file new findings. If it spots something new, it writes a new candidate and the pipeline validates that separately.
Phase 5 — Coverage ledger
Write .audit/coverage-ledger.json per schemas/coverage.schema.json.
Every category selected in the plan appears exactly once, with an honest
status: complete, partial, not_applicable, blocked, or
needs_validation. partial and blocked entries must list specific
gaps ("did not examine the legacy /admin routes; they are behind VPN
per deploy config"). Counts (files_examined, routes_examined) should be
real counts, not guesses.
Phase 6 — Deterministic gates
security-audit validate .audit <target> # schema + evidence + redaction checks
security-audit coverage .audit # plan-vs-ledger consistency
security-audit report .audit # renders REPORT.md + detail filesvalidate fails on: schema violations, cited files/lines that do not exist,
confirmed findings without severity reasoning or rejection attempts, and
probable unredacted secrets. Fix findings until the gates pass. Do not edit
the schemas to make failing findings pass.
Phase 7 — Reporting and handoff
The CLI renders REPORT.md, FINDINGS-DETAIL.md, NEEDS-VALIDATION.md.
Present the executive summary to the user: target, stack, coverage, confirmed
findings, unresolved leads, limitations, remediation priorities. Never hide
uncertainty; NEEDS-VALIDATION.md exists precisely to carry it.
Re-audits
After fixes are applied, re-run:
security-audit audit <target> --output .audit-2
# …hunt + validate again into .audit-2/findings.json …
security-audit reaudit .audit/findings.json .audit-2/findings.jsonClassification rules:
- resolved — only when the new audit's validator actively re-examined the old finding against current code and found the control present. A code change near the finding is not sufficient; revalidate, then resolve.
- regression — a previously rejected finding re-confirmed now.
- unchanged / new — self-explanatory; the diff in
reaudit-report.jsonrecords each unchanged finding'sprevious_idlineage, and per the schema a finding may carry areauditobject linking it back to its predecessor.
Evidence standard (applies to every hunter)
Every finding must contain: exact file(s) and line(s); the affected
function/route/component; the attacker-controlled input; the trust boundary
crossed; the vulnerable operation; the control that should exist; the control
that is actually missing/broken; concrete impact; and a reproduction path
(static reasoning or non-destructive local test). If any element is missing,
the finding is not ready — mark it needs_validation with what is missing,
or drop it.
Severity discipline
Severity is computed from: exploitability, required privileges, attack
complexity, affected assets, C-I-A impact, and blast radius — not from the
category name. An XSS in an admin-only page is not automatically "high".
Document the reasoning in severity_reasoning; the mechanical gate enforces
its presence on confirmed findings. Do not manufacture severity from thin
evidence; when in doubt, lower severity and raise the validation bar.
Anti-goals
- Do not inflate the finding count to look thorough.
- Do not file "hardening suggestions" as vulnerabilities (use
informationalseverity sparingly, with evidence). - Do not chain hypothetical exploits through code that does not exist.
- Do not edit schemas or the CLI to accept invalid findings.
- Do not run destructive commands against the target or anything else.
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.

