aeo-optimization
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
Structured, adversarial, multi-phase security audit of a codebase — recon → coverage-led hunting → finder≠validator validation → machine-readable findings → target-neutral report
$ npx -y skills add alinaqi/claude-bootstrap --skill security-audit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/security-auditContext preview
The summary Claude sees to decide when to auto-load this skill.
Structured, adversarial, multi-phase security audit of a codebase — recon → coverage-led hunting → finder≠validator validation → machine-readable findings → target-neutral report
name: security-audit description: Structured, adversarial, multi-phase security audit of a codebase — recon → coverage-led hunting → finder≠validator validation → machine-readable findings → target-neutral report when-to-use: When asked to "security audit", "find vulnerabilities", "pen-test the code", or audit a codebase/PR for security before a release. For preventive coding patterns use `security`; for a quick branch review use `/security-review`. user-invocable: true allowed-tools: [Read, Glob, Grep, Bash, Task] effort: high
A full audit, not a checklist. It runs in phases, keeps a coverage ledger so nothing is skipped silently, and — the core discipline — **the agent that finds a candidate is never the one that confirms it**. Severity is `likelihood × impact`, not deviation from a style rule. Output is machine-readable and reproducible.
> Methodology inspired by Cloudflare's public security-audit-skill, rebuilt to > reuse maggy's own pieces: `council-review` for adversarial validation, > `cpg-analysis` (Joern/CodeQL) for static taint/data-flow, `agent-teams` / > `polyphony` for isolated parallel hunters, and `security` for the vuln classes.
file:line of the boundary that fails and a concrete attack that crosses it.
different agent (or a `council-review` model) tries to *disprove* it.
practice". A hardcoded key in a test fixture is not critical; an auth bypass on a tenant boundary is.
ledger unit with a status; a coverage critic hunts the gaps.
advice. Report only boundary failures you can stand behind.
Map the target before hunting. Identify: entry points (HTTP routes, CLI, queue consumers, webhooks), trust boundaries (authn/authz, tenant isolation, privilege transitions), input surfaces (params, headers, files, env, deserialization), secret handling, external calls (SSRF surface), and data stores. Write a short `architecture.md`, then enumerate every surface as a unit in `coverage-ledger.json` (`{id, surface, boundary, status: pending}`).
For each ledger unit, hunt the relevant classes. Prefer **isolated sub-agents** (via `agent-teams` / `polyphony`) so one hunter's context does not bias another, and lean on `cpg-analysis` for data-flow/taint where a graph beats grep. Mark each unit `hunted`; a **coverage critic** pass re-reads the ledger and reopens units that were skimmed. Classes to cover (depth in `security` + `cpg-analysis`):
| Class | Look for | |-------|----------| | Injection | SQL/NoSQL/OS/LDAP/template; unparameterized queries, `shell=True`, eval | | AuthN / AuthZ | missing checks, IDOR, broken tenant isolation, JWT/session flaws | | Secrets | keys in code/history/logs, client-exposed `VITE_/NEXT_PUBLIC_` secrets | | SSRF / egress | user-controlled URLs, metadata endpoints, unvalidated redirects | | Deserialization | pickle/yaml.load/Marshal on untrusted input | | Path / file | traversal, arbitrary write, zip-slip, unsafe temp files | | LLM / prompt | prompt injection, tool-abuse, unbounded fan-out, data exfil via output | | Supply chain | typosquats, unpinned deps, postinstall scripts, CI token scope | | Cloud / IaC | over-broad IAM, public buckets, exposed admin, secrets in env | | Client-side | XSS, DOM sinks, CSP gaps, sensitive data in `localStorage` | | Resource / DoS | unbounded loops/allocations, regex catastrophic backtracking | | Data isolation | cross-tenant reads, missing RLS, PII in logs/caches | | Memory (native) | overflow, UAF, integer wrap (for C/C++/unsafe Rust targets) |
For each unique candidate, a *different* reviewer attempts to **disprove** it: is the tainted input actually reachable? is there a guard upstream? is the sink real? Route this through `council-review` (multiple models vote) for anything rated high/critical. Assign a verdict: `confirmed`, `needs_validation`, or `rejected`.
Emit `findings.json` conforming to `report-schema.json` (shipped in this skill). Validate it before reporting:
python3 "$(cat ~/.claude/.bootstrap-dir)/skills/security-audit/validate_findings.py" findings.json
The validator enforces the rules that keep the audit honest: unique ids, valid enums, and that every `confirmed` finding has a file:line location, an attack scenario, and a `validated_by` that differs from `found_by`.
A fresh agent re-opens each `confirmed` finding and checks the cited file:line *still* supports the claim (code may have moved). A material mismatch drops it back to `needs_validation`.
Write `REPORT.md` (executive summary + confirmed findings by severity), `FINDINGS-DETAIL.md` (per-finding evidence + remediation), and `NEEDS-VALIDATION.md` (candidates that could not be confirmed). Neutral tone: no vendor names, no editorializing, just boundary → attack → impact → fix.
untrusted target code to "see what it does".
Turn Claude Code into a self-reviewing, test-enforced engineering system that remembers context across sessions — then route work across 13 models from a single dashboard.
Repo: alinaqi/claude-bootstrap
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement
Build AI agents with Pydantic AI (Python) and Claude SDK (Node.js)
Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing