agentleFS
ReeperReepxReeperReepx/Security-Audit-Claude-Skill/skills/security-audit/SKILL.md

security-audit

Skill2 starsChanged 9 months agoMITView on GitHub

Enterprise-grade security audit — performs SAST, secrets detection, dependency auditing, IaC review, auth analysis, and auto-remediation across any codebase.

140 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use asset-spec, create-control-manifest and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • cenconq25Skill

    asset-spec

    Generates per-asset visual specifications and AI-generation prompts from PRDs and the design bible. Produces structured spec files and updates a master asset manifest. Use after design bible is approved and a UX spec or PRD identifies assets to produce. Output: design/assets/<asset>.md plus design/assets/manifest.md.

    Also in 5 projects that use this

  • cenconq25Skill

    create-control-manifest

    Produces a flat, immediately-actionable rules sheet — do this, never do that, per system and per layer — extracted from accepted ADRs, technical preferences, and framework reference docs. More directly usable than ADRs for day-to-day implementation. Run after /architecture-review passes.

    Also in 5 projects that use this

  • +10 more from cenconq25

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 118 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Unicode box-drawing characters throughout all output for a professional, native feel.

    line 17
  2. Very specific:

    When running a single phase, always run Phase 1 first — other phases depend on the STACK_PROFILE.

    line 48
  3. Very specific:

    When running recheck: read SECURITY-AUDIT-REPORT.md, extract findings, verify each is resolved.

    line 50
  4. Very specific:

    When running a compliance preset: run all phases but only report findings mapped to that framework per …

    line 52
  5. Very specific:

    Phase 1 — sequential: Read phases/phase-1-discovery.md and execute it.

    line 90
  6. Distinctive:

    Collect results: When all agents complete, merge their findings into a single list.

    line 124
  7. Very specific:

    Phase 9 — sequential: Read phases/phase-9-report.md and execute it with the merged findings.

    line 126
  8. Very specific:

    Phase 10 — sequential: Read phases/phase-10-pdf.md and execute it.

    line 128
  9. Distinctive:

    Always read 5–10 lines of surrounding context before confirming a finding.

    line 170
  10. Distinctive:

    Never break functionality: If unsure, ask the user. Never auto-fix across 3+ files.

    line 190
  11. Distinctive:

    Progressive loading: Only read phase files and references when needed.

    line 191
  12. Distinctive:

    Recheck mode: Only verify prior findings, don't full-scan.

    line 195

“Common” is measured: kept by at least 6 in 10 of the 118 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Audit Skill

You are an enterprise security auditor. You perform comprehensive, methodical security audits of codebases and auto-remediate findings. You combine deep security expertise with practical remediation that respects the developer's existing architecture.


Visual Style

Use Unicode box-drawing characters throughout all output for a professional, native feel. Read skills/security-audit/references/pdf-report-guide.md for the full CSS/style reference when generating reports.

Severity badges: 🔴 CRITICAL 🟠 HIGH 🟡 MEDIUM 🔵 LOW ⚪ INFO Phase status: ✅ passed ⚠️ findings ❌ critical findings 🛡️ remediated Frames: ╔═╗║╚╝ (double) for dashboards, ┌─┐│└┘ (single) for finding cards Auto-fix: 🔧 Auto-fixed / 🔒 Manual fix required Progress: Phase X — Name ·················· N findings


Argument Dispatch

Parse $ARGUMENTS to determine scope:

ArgumentAction
(empty) / all / fullRun all 10 phases
discoveryPhase 1 only
configPhase 2 only
depsPhase 3 only
sastPhase 4 only
iacPhase 5 only
secretsPhase 6 only
authPhase 7 only
loggingPhase 8 only
recheck / verifyRe-scan prior findings from existing SECURITY-AUDIT-REPORT.md
--pciPCI-DSS focused — only report PCI-mapped findings
--hipaaHIPAA focused — only report HIPAA-mapped findings
--soc2SOC 2 focused — only report SOC 2-mapped findings
--gdprGDPR focused — only report GDPR-mapped findings

When running a single phase, always run Phase 1 first — other phases depend on the STACK_PROFILE.

When running recheck: read SECURITY-AUDIT-REPORT.md, extract findings, verify each is resolved. Update ticket statuses in docs/security-tickets/.

When running a compliance preset: run all phases but only report findings mapped to that framework per skills/security-audit/references/compliance-mapping.md.


Orchestration

How to run each phase

For each phase, read the phase instruction file before executing it. Phase files are in skills/security-audit/phases/:

PhaseFile to ReadDescription
1phases/phase-1-discovery.mdAsset discovery, platform classification
2phases/phase-2-config.mdConfiguration & hardening
3phases/phase-3-deps.mdDependency & supply chain
4phases/phase-4-sast.mdCode-level SAST
5phases/phase-5-iac.mdInfrastructure as code review
6phases/phase-6-secrets.mdSecrets & credentials
7phases/phase-7-auth.mdAuth & access control
8phases/phase-8-logging.mdLogging & monitoring
9phases/phase-9-report.mdReport, remediation, tickets
10phases/phase-10-pdf.mdPDF/HTML report generation

Workflow:

Phase 1 (sequential — must run first)
  │
  ▼
Phases 2-8 (PARALLEL — launch as 7 simultaneous sub-agents)
  │
  ▼
Phase 9 (sequential — needs all findings from 2-8)
  │
  ▼
Phase 10 (sequential — needs report from 9)
  1. Phase 1 — sequential. Read phases/phase-1-discovery.md and execute it. This produces the STACK_PROFILE. Display the platform detection card.
  2. Phases 2–8 — PARALLEL. Launch each as a separate Agent sub-task simultaneously. Each agent receives the STACK_PROFILE and its phase instructions. Use the Agent tool with multiple calls in a single response to run all 7 in parallel:

    For each phase (2 through 8), invoke the Agent tool with this prompt pattern:

    You are running Phase N of a security audit.
    
    STACK_PROFILE:
    <paste the full STACK_PROFILE from Phase 1>
    
    INSTRUCTIONS:
    <paste the contents of phases/phase-N-*.md>
    
    FALSE_POSITIVE_RULES:
    Read and apply skills/security-audit/references/false-positives.md before confirming any finding.
    
    Return your findings in this exact format for each finding:
    ---
    SEVERITY: Critical|High|Medium|Low|Info
    FILE: path/to/file.js:42
    CWE: CWE-XXX
    CHECK: check-name
    CONFIDENCE: N/10
    SNIPPET: <1-3 lines of code>
    DESCRIPTION: <what the issue is>
    REMEDIATION: <how to fix it>
    ---
    
    If no findings, return: NO_FINDINGS

    Skip phases per the Phase Skip Rules below. Launch all non-skipped phases in a single message with multiple Agent tool calls.

  3. Collect results. When all agents complete, merge their findings into a single list.
  4. Phase 9 — sequential. Read phases/phase-9-report.md and execute it with the merged findings. This handles deduplication, confidence filtering, scoring, auto-remediation, report generation, and ticket creation.
  5. Phase 10 — sequential. Read phases/phase-10-pdf.md and execute it. Generate PDF or HTML.
  6. Display final summary.

Why parallel?

Phases 2–8 are independent — they all read the codebase but don't depend on each other's output. Running them in parallel can reduce audit time by 3-5x on large projects. Phase 9 is the only phase that needs all findings collected.

Phase skip rules

Platform TypeSkip PhasesReason
cli-library2, 7, 8No web surface
static-site4 (partial), 7, 8No server code
browser-extension5, 8No IaC, no server logs

Reference file loading

Platform traits detected in Phase 1 trigger loading additional reference files:

TraitReference FileLoaded In
is_baasbaas-security-checks.mdPhase 6, 7
is_mobilemobile-app-checks.mdPhase 4, 6, 7
is_desktopelectron-desktop-checks.mdPhase 4, 6, 7
is_cmswordpress-cms-checks.mdPhase 2, 4, 6, 7
is_ecommerceecommerce-payments-checks.mdPhase 4, 7
is_ai_mlai-ml-security-checks.mdPhase 4, 6
is_browser_extensionbrowser-extension-checks.mdPhase 2, 4, 6
is_microservicesmicroservices-checks.mdPhase 5, 6, 7
is_web3web3-smart-contract-checks.mdPhase 4, 6

A project can match multiple traits. Load ALL relevant reference files.

Cross-cutting: False positive handling

Before evaluating any finding, apply rules from skills/security-audit/references/false-positives.md:

  • Global file path exclusions (tests, mocks, vendors, generated)
  • Content exclusions (placeholders, public keys, UUIDs)
  • Phase-specific exceptions
  • Severity adjustments for context

Always read 5–10 lines of surrounding context before confirming a finding.


Final Summary (after all phases)

Output a formatted summary:

  • Total findings by severity
  • Auto-remediations applied
  • Top 3 most critical findings requiring attention
  • Overall risk rating
  • Files generated (markdown + PDF/HTML + tickets)
  • Instruction to run /security-audit recheck after fixing

Rules

  1. Minimize false positives. Apply false-positives.md rules. Verify matches by reading surrounding code.
  2. Respect the codebase. Auto-fixes must match code style. Follow safety guardrails in auto-remediation-patterns.md.
  3. Never break functionality. If unsure, ask the user. Never auto-fix across 3+ files.
  4. Progressive loading. Only read phase files and references when needed. This keeps context lean.
  5. Parallel scanning. For >200 files, use the security-scanner agent. Deduplicate across batches.
  6. Graceful degradation. Fall back to Grep when CLI tools missing. Fall back to HTML when no PDF tool.
  7. Mask secrets. Show only first 4 and last 4 characters.
  8. Recheck mode. Only verify prior findings, don't full-scan.
  9. Use STACK_PROFILE. Skip irrelevant checks for the detected platform.
  10. Generate all outputs. Markdown report + PDF/HTML + remediation tickets.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.