| name | security-audit |
| description | Audits security and supply-chain risk between two git refs for pre-release security review. |
Pre-Release Security Audit (Between Any Two Git Refs)
This skill compares any two git refs (tag/branch/commit SHA) and audits:
- Source-code diffs for security regressions
- Dependency changes (direct + transitive) and lockfile determinism
- Newly introduced package behaviors inside
node_modules
- CI/CD workflow risks in
.github/workflows and build configs
The output is a Markdown report, with a unique title and filename containing the refs to avoid overwrites.
0) Mandatory: confirm audit range (BASE_REF, TARGET_REF)
Ref rules
- Accepted: tag / branch / commit SHA
BASE_REF = starting point, TARGET_REF = ending point (release candidate)
If refs are not explicitly provided by the user
Ask exactly once before doing any work:
Which two git refs should I compare? (e.g. v5.19.0 → release/v5.20.0, or main → feature/xxx)
If only one ref is provided
Ask for the missing ref. Do not assume defaults unless the user explicitly says:
- “latest tag → HEAD”
- or provides an equivalent instruction.
1) Output requirements (hard constraints)
- Report filename must include refs to avoid collisions:
security-audit__${BASE_REF_SAFE}__to__${TARGET_REF_SAFE}.md
BASE_REF_SAFE/TARGET_REF_SAFE must replace / with __ (or -) for filesystem safety.
- Report title must include refs:
# Security Audit Report (${BASE_REF} → ${TARGET_REF})
- Evidence must be traceable: file path + line numbers (when possible) + short snippet.
2) Safety rules (must follow)
- Never print or paste secrets: mnemonics/seed phrases, private keys, signing payloads, API keys, tokens, cookies, session IDs.
- If command outputs may contain secrets (env dumps, logs), redact before writing to the report.
- Prefer short excerpts; do not paste large bundles.
3) Execution checklist
Step A — Verify refs and collect context
Step B — Collect key diffs
Focus on:
Step C — Dependency delta (direct deps)
Step D — Lockfile determinism (best-effort)
Step E — Known vulnerability scanning (best-effort)
Step F — New dependency deep inspection (node_modules)
For each newly added direct dependency:
Step G — Source diff security review (AI reasoning step)
Within ${BASE_REF}..${TARGET_REF} diffs, prioritize:
- signing flows / key handling / mnemonic
- network layer / RPC / telemetry
- storage layer (local/secure storage)
- logging / analytics / error reporting
Output: suspicious changes list (each with summary, impact, evidence excerpt).
Step H — CI/CD & build pipeline risks
Inspect .github/workflows/** and build configs:
4) Report template
Write the report to:
security-audit__${BASE_REF_SAFE}__to__${TARGET_REF_SAFE}.md