security-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
Skill by lrstanley
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/lrstanley-security-audit
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, testing, security, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
security-audit- Description
- Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
- License
- MIT
- Instructions
- 189 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (21)
- AI-AND-LLM.md
- ATTACK-CLASSES.md
- CLIENT-SIDE.md
- CLOUD-AND-DEPLOYMENT.md
- DATA-ISOLATION-AND-LIFECYCLE.md
- DESKTOP-MOBILE-AND-LOCAL-IPC.md
- HUNTING.md
- LICENSE
- MEMORY-SAFETY-AND-BINARY.md
- PROTOCOLS-RPC-AND-MESSAGING.md
- RECONNAISSANCE.md
- RESOURCE-EXHAUSTION-AND-AVAILABILITY.md
- SKILL.md
- SUPPLY-CHAIN-AND-RELEASE.md
- VALIDATION-AND-REPORTING.md
- WEB-PROTOCOL-AND-AUTH.md
- report-schema.json
- validate-coverage-ledger.cjs
- validate-coverage-ledger.test.cjs
- validate-findings.cjs
- validate-findings.test.cjs
SKILL.md (first lines)
# Security Audit
Find vulnerabilities that violate a real trust boundary, then give owners the source evidence, safe reproduction, priority, and smallest effective fix. This is a defensive, source-first workflow. A candidate without a concrete affected principal, resource, or security outcome is not a confirmed finding.
## Operating modes
This skill is guidance by default. Loading it does not authorize the complete audit workflow or file creation.
- **Guidance mode**: For security questions, focused reviews, methodology, triage, or investigation of specific findings, use only the relevant parts of this skill. Do not automatically run all six phases, create an output directory, or write audit artifacts. You may launch focused agents when useful; they return results to the current task.
- **Full audit mode**: Use the complete workflow when the user explicitly asks to audit or pen-test a codebase, asks for a full, comprehensive, or end-to-end security review, or requests report artifacts. Run all six phases and write the files defined below.
If the request could mean either mode, ask one focused question before creating files or starting the complete workflow.
## Platform terminology
This skill is agent-neutral:
- **Parent** is the agent that coordinates the run and owns shared state.
- **Task tool** is the platform's delegation or sub-agent mechanism.
- **`research` agent** is a delegated agent for focused source exploration and factual verification.
- **`general` agent** is a delegated agent for broad investigation and bounded local execution.
- **`subagent_type:`** in a heading names which of these two delegated agent roles runs that work.
Use equivalent platform capabilities while preserving role, write-isolation, prompt, and independence boundaries.
## Universal execution safety
These rules apply in both operating modes. Source inspection is read-only. Run target-controlled builds, tests, processes, browsers, emulators, fuzzers, and fixture processing only inside an OS-enforced sandbox that provides all of these controls:
- no external network; use only an isolated loopback namespace when the check needs local client/server traffic;
- an empty environment populated from an explicit allowlist with safe values, with scratch-local `HOME`, temporary directories, and caches;
- a read-only target and toolchain, with the target-controlled process able to write only inside its assigned `scratch/` directory; and
- explicit low CPU, memory, process, file-size, disk, and wall-clock limits.
The agent, outside the target-controlled process, may make a disposable source copy in an assigned `scratch/` directory when a build must write beside source. In guidance mode, do not retain target-controlled files. In full audit mode, only trusted parent-side code may promote the minimum non-secret result to retained `artifacts/` using the procedure under Write isolation. Never expose a retained output directory (other than the agent's own assigned `scratch/`), another agent's directory, the host home directory, credentials, sockets, or shared services to target code. Do not install dependencies or let builds fetch them. Use only tools and dependencies already available locally. If every control cannot be enforced, do not execute target code: report the missing sandbox capability as a needs-validation blocker and give a safe validation plan.
Use dummy principals, fixtures, and secrets. Do not probe deployed endpoints, external services, shared infrastructure, production identities, other users' data, or live control planes. Do not test availability against a live or shared process, publish artifacts, alter releases, spend paid API quota, or continue beyond the minimum local effect needed to establish a defect. If the decisive fact is outside source or the sandboxed fixture, report it as needing validation.
## Full audit setup
In full audit mode, resolve these values before reconnaissance:
- **Skill directory**: the absolute directory containing this `SKILL.md`.
- **Target**: the absolute repository root under review.
- **Repo name**: a stable repository identifier from the directory or local Git remote.
- **Output directory**: a new writable directory outside the target, defaulting to `~/security-audit-skill/<repo-name>/run-<N>`, where `<N>` is the next unused integer. Use a directory inside the target only when the user explicitly selects it and the parent verifies that version control ignores the whole directory. Otherwise stop and request an external path.
- **Source ref**: the reviewed commit and whether the worktree is dirty. Do not treat unreviewed generated or modified files as another revision.
### Write isolation
The parent creates and is the only writer of shared run files:
- `run-metadata.json`
- `architecture.md`
- `coverage-ledger.json`
- `findings.json`
- `REPORT.md`
- `FINDINGS-DETAIL.md`
- `NEEDS-VALIDATION.md`
Each hunter or verifier receives a unique root under `<output-dir>/agents/<agent-id>/`, with separate `scratch/` and `artifacts/` directories. Canonical agent IDs match `^[a-z0-9][a-z0-9_-]{0,63}$` and must not equal a Windows device name such as `con`, `prn`, `aux`, `nul`, `com1` through `com9`, or `lpt1` through `lpt9`. Lowercase IDs prevent case-fold collisions. The agent and every target-controlled process may write only to `scratch/`; retained `artifacts/` is parent-owned, is never exposed to the sandbox, and is writable only by trusted parent-side promotion code. Agents may not change shared files, target source, retained artifacts, or another agent's directory. Do not use `/tmp` or the host home directory as a writable fallback.
Before execution, the parent opens and retains trusted, non-inheritable directory descriptors for the agent's `scratch/` and `artifacts/` roots, and records an allowlist of expected scratch-relative artifact files plus explicit per-file and cumulative byte limits. Never pass those descriptors to the agent or sandbox. After the sandbox and all its processes terminate, trusted parent-side code promotes each allowlisted file separately:
1. Validate the declared relative path: reject absolute, empty, `.`, `..`, or symlinked components.
2. Walk each parent component from the retained scratch-root descriptor with no-follow directory-relative operations; never reopen by path.
3. Open the leaf no-follow and nonblocking.
4. Verify with `fstat` that it is a regular file with link count exactly one and within the recorded per-file and cumulative byte limits.
5. Enforce those limits again while reading from that descriptor.
6. Copy exactly the verified size, repeat `fstat`, and reject a changed identity, type, link count, or size.
7. For the destination, walk every parent component from the retained artifacts-root descriptor with no-follow directory-relative operations; require each existing component to be a real directory, and create any missing directory exclusively before reopening and verifying it no-follow.
8. Create the leaf exclusively without following links, verify that the opened destination is a regular file with link count exactly one, and copy from the verified source descriptor without reopening either path.
9. Use equivalent race-safe APIs on non-POSIX systems.
10. Never recursively copy or glob scratch, extract an archive into artifacts, or open or promote a symlink, FIFO, socket, device, directory, hard-linked file, changing file, or file that exceeds its bound.
11. If any check is unavailable, cannot be enforced, or fails, discard the scratch entry; if it is decisive evidence, retain `needs_validation` with the exact promotion blocker.
[HUNTING.md](HUNTING.md) and [VALIDATION-AND-REPORTING.md](VALIDATION-AND-REPORTING.md) carry this procedure as one identical fenced block for hunter and verifier prompts; it states the same rules in the same order as this list.
For a reproduced check, record the command, exact test input, sandbox limits, and only the allowlisted environment variable names plus safe non-secret values needed to reproduce it. Never capture or copy the ambient environment, inherited variables, credential values, authentication state, or unrelated host paths. Launch from an empty environment rather than trying to redact one after execution.
Before delegation, the parent writes `run-metadata.json` with at least `run_id`, `repo`, `target`, `source_ref`, `profile`, `scope_paths`, `budget` (null if unset), `execution_policy: "sandboxed-source-and-local-only"`, selected companion files, prior-run paths, shared-file owners, and `run_status: "in_progress"`. Update metadata only when those facts change; candidate state belongs in the coverage ledger and `findings.json`.
## Full audit planning
The coverage, prior-run, profile, and budget requirements in this section apply only in full audit mode.
### Coverage and prior runs
No one pass is complete. Build a deterministic coverage plan before hunting and update it after every agent result. [RECONNAISSANCE.md](RECONNAISSANCE.md) defines the stable coverage units and [HUNTING.md](HUNTING.md) defines coverage-critic waves. The parent alone updates the ledger.
If prior runs exist, read every compatible `coverage-ledger.json` and `findings.json` before planning the current run:
1. Compare the relevant current source with each prior record and unit. A prior source ref alone is not evidence that a path is unchanged.
2. Carry a prior `confirmed` record into the current candidate set only when its relevant source and conditions are unchanged and its evidence still meets the current contract. Link it to a current ledger unit seeded `planned`, preserve its fingerprint, exclude only that carried root cause from hunters, and send the carried record through the current final verification path; the Phase 3 verifier that re-checks it becomes that unit's assignment owner and moves it to `candidate`.
3. When relevant source for a prior `confirmed` record changed, create a current planned revalidation unit. Do not put that record on the hunter exclusion list. It remains confirmed only if current independent validation establishes the current path and result.
4. Make prior `needs_validation`, `deferred`, `blocked`, `out_of_scope`, and any changed-source unit current work. A still-external `needs_validation` record may be carried only after the current source trace is checked and linked by fingerprint to a current `planned` unit whose verifier re-check supplies its owner and evidence; the record keeps the unresolved blocker. These prior states never suppress a current unit.
5. A prior same-source covered unit may inform priority, but it remains visible in the current ledger. A prior `rejected` record suppresses only the unchanged failed claim, not coverage of its unit; changed evidence creates current work.
6. Read the prior profile and scope. A prior `quick` or scoped ledger contributes only its recorded evidence and gaps, never an implied "rest is fine."
If no prior ledger exists, say so in the final coverage statement. Never imply that one run exhausts the target.
### Run profiles and scope
During full audit setup, pick a profile from the user's request or propose one from the target's size and stakes. Record it in `run-metadata.json` (`profile`, `scope_paths`) and state it in the report. The default is `standard`.
- **`quick`** — a bounded pass for small targets, re-runs, or a fast first look. Coarsen ledger units to surface × boundary × attack class (subsystem uses the fixed canonical `profile/quick/all-in-scope-subsystems` identifier), run exactly one hunter wave followed by exactly one final coverage-critic pass, and use one fresh verifier per candidate for both candidate validation and final record verification. Do not launch a follow-up hunter wave: record the critic's accepted discoveries and reassignments as `deferred`.
- **`standard`** — the workflow as written.
- **`deep`** — for high-stakes or large targets. Split ledger units per subsystem and lifecycle mode, run critic waves to a clean pass, keep candidate validation and final record verification as separate fresh agents, and give `prior_covered_same_source` units an independent second pass.
A **scoped run** audits a subset: named paths, one subsystem, one companion domain, or the diff between two source refs. Seed ledger units only for in-scope surfaces and record everything else as `out_of_scope` — never as `covered`. A scoped or `quick` run must present itself as partial coverage.
Profiles change breadth and redundancy, never the evidence bar. Do not scale away the candidate gate, the source/local execution boundary, `needs_validation` discipline, schema validation, or independent verification of `confirmed` records.
#### Cost budget
The ledger makes spend countable: one unit is roughly one hunter assignment, and one surviving candidate is one or two verifier assignments depending on profile. When the user sets a budget — or the parent proposes one for a large target — record `budget` in `run-metadata.json` as a maximum number of agent invocations across all phases.
Apply the strict budget gate before launching any reconnaissance agent. Reserve the four baseline reconnaissance calls, one final post-wave critic for `quick` or one post-wave plus one distinct final-clean critic for `standard`/`deep`, and at least one verifier call. Add focused reconnaissance only after repeating this gate for each extra call. If the requested budget cannot fund that minimum, launch no agent: ask for a larger budget, narrower scope, or different profile. If the request remains unchanged, set `run_status: "incomplete"` with `incomplete_reason: "budget_cannot_fund_reconnaissance_and_reserves"` and report that no audit pass ran.From lrstanley/skills, MIT.
More from lrstanley/skills
- 0.592score
golang-tui
https://github.com/lrstanley
Expert TUI development in Go with Charm libraries (Bubble Tea, Lip Gloss, Bubbles) and ecosystem packages.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
golang
https://github.com/lrstanley
Expert Go developer.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
golang-packages
https://github.com/lrstanley
Queries pkg.go.dev metadata for Go packages and modules via pkgsite-cli and the pkg.go.dev v1beta API.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
kubernetes-upgrade-analysis
https://github.com/lrstanley
Analyzes a live Kubernetes cluster and its GitOps sources (Flux, Argo CD) for a cluster minor-version upgrade or a single component upgrade, and writes a…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
shadcn-vue
lrstanley
Manages shadcn-vue components and projects — adding, searching, fixing, debugging, styling, and composing UI.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
documentation-writer
https://github.com/lrstanley
Creates high-quality technical documentation using the Diataxis framework.
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
simplify
https://github.com/lrstanley
Find low-info comments, one-off helpers, perf issues, and reuse opportunities.
SkillAFreshness: A★ 1Claude Code +9 - 0.578score
remotion-best-practices
lrstanley
Router for all Remotion skills
SkillAFreshness: A★ 1Claude Code +9 - 0.559score
nuclear-review
lrstanley
Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth.
SkillAFreshness: A★ 1Claude Code +9 - 0.557score
grill-me
lrstanley
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 12, 2026 (16 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/lrstanley/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.828score
security-audit
cloudflareOfficial
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillBFreshness: B★ 43.8KClaude Code +9 - 0.358score
security-audit
AnthonyPoschen
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillAFreshness: A★ 2Claude Code +9 - 0.352score
security-audit
sgpopov
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillAFreshness: A★ 1Claude Code +9 - 0.349score
security-audit
mariusrostad
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillAFreshness: A★ 1Claude Code +9 - 0.339score
security-audit
Ryuking1228
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillAFreshness: AClaude Code +9 - 0.336score
security-audit
HEROgold
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillAFreshness: AClaude Code +9 - 0.336score
security-audit
cnmeeia
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons.
SkillAFreshness: AClaude Code +9
More from lrstanley
- 0.587score
shadcn-vue
lrstanley
Manages shadcn-vue components and projects — adding, searching, fixing, debugging, styling, and composing UI.
SkillAFreshness: A★ 1Claude Code +9 - 0.578score
remotion-best-practices
lrstanley
Router for all Remotion skills
SkillAFreshness: A★ 1Claude Code +9 - 0.559score
nuclear-review
lrstanley
Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth.
SkillAFreshness: A★ 1Claude Code +9 - 0.557score
grill-me
lrstanley
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
security-audit skill. Agent Mart. https://agentmart.dev/skills/lrstanley-security-audit (last updated 2026-10-24)