agentleFS
jsathjsath/claude-skills/skills/dev/security-auditor/SKILL.md

security-auditor

Skill14 starsChanged 31 days agoMITView on GitHub

Runs an evidence-backed security audit of a code repository (secrets, dependency advisories, commit history, then a Claude code review against a threat model) and produces a findings JSON plus a report with a remediation roadmap. Also covers read-only triage of a suspected live incident such as stored XSS, Docker/UFW host exposure reviews, LLM email-to-SMS automation design, identity-export sanitising, 2FA setups and pre-transfer repo backups. Use when someone says 'security audit this repo', 'check for leaked secrets', 'is this host exposed', 'review this automation for prompt injection', or 'someone put a script tag in our booking form'. Needs Claude Code (or any shell) with bash, git and python3; extra scanners are used if installed.

54 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use proofreader, refactoring-guide 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.
  • xcrrrSkill

    proofreader

    Use this skill when reviewing written content for grammar, spelling, punctuation, style consistency, and tone—before publishing, submitting, or sending. Trigger phrases: 'proofread this', 'check my writing', 'review this for errors', 'edit this email/report/essay'. Do NOT use when structural rewrites or content changes are needed—proofreading fixes surface errors, not substantive problems.

    Also in 3 projects that use this

  • peopleforresterSkill

    refactoring-guide

    Safe refactoring patterns and techniques. Use when the user wants to improve code structure, reduce duplication, or make code more maintainable without changing behavior. Emphasizes incremental changes with test coverage.

    Also in 3 projects that use this

  • zwjbendnSkill

    habit-builder

    Designs and manages healthy habits for sustainable weight loss through lifestyle change. Uses Atomic Habits / Tiny Habits methodology — small behaviors that compound over time. Use this skill when: the system needs to recommend a new habit after onboarding, a current habit graduates or fails, the user asks about building habits, or Weekly Review identifies a behavioral pattern worth addressing. Also use when evaluating habit progress, deciding when a habit has "graduated," or handling a restart after the user falls off. This skill does not send its own reminders — habit check-ins are woven into meal conversations managed by Notification Composer. This skill owns the check-in logic (when, how often, tone); Notification Composer provides the conversation vehicle.

    Also in 3 projects that use this

  • juanlurgSkill

    sql-optimizer

    Analyzes SQL queries and generates an optimization report notebook with explanations, identified issues, and rewritten queries. Use when the user wants to optimize, explain, improve, or debug a SQL query, or mentions query performance, slow queries, or SQL optimization.

    Also in 3 projects that use this

  • belokonmSkill

    data-scientist

    Expert in statistical analysis, predictive modeling, machine learning, and data storytelling to drive business insights.

    Also in 3 projects that use this

  • glinckerSkill

    qa-engineer

    QA specialist agent for test planning, execution, and regression analysis

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 47 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never print a secret value anywhere: reports carry file, line and rule only.

    line 9
  2. Distinctive:

    All of these are read-only until the user approves a specific change.

    line 26
  3. Very specific:

    Threat model: Read threat-model-prompt.txt and write threat-model.md (assets, entry points, auth boundaries, STRIDE per component, top 5 …

    line 47
  4. Distinctive:

    Never visit a suspicious payload host or URL.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 47 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 Auditor

Deterministic scanners first, Claude's code review second, a human decides on fixes. Never print a secret value anywhere: reports carry file, line and rule only.

Pick the job

AskGo to
Audit a repo / find leaked secrets / vulnerable depsRepository audit (below)
Something odd showed up in a booking, CRM, calendar or email fieldreferences/stored-xss-booking-triage.md
Docker host with UFW, Tailscale or a cloud firewallreferences/docker-ufw-tailscale-host-hardening.md
LLM that reads email or messages and sends SMS, push or voicereferences/secure-llm-communications-architectures.md
Agent that monitors public meetings or hearingsreferences/secure-public-meeting-monitoring.md
User export (Clerk, Auth0, Firebase, Supabase) for outreach or researchreferences/identity-export-sanitization.md
Password manager, TOTP, passkeys, lost phonereferences/personal-identity-2fa.md
Saving a secret from a one-time-secret linkreferences/secure-one-time-secret-ingestion.md
Backing up a repo before transferring ownershipreferences/repository-pre-transfer-backup.md
Approving generated SOC 2 / ISO policiesreferences/compliance-policy-review.md

All of these are read-only until the user approves a specific change.

Repository audit

Requirements: bash, git, python3. Optional, used when present: osv-scanner (all ecosystems), npm, pip-audit, govulncheck, bundle-audit. For deeper secret coverage, gitleaks or trufflehog if installed.

  1. Run the deterministic stages:
    bash scripts/audit-repo.sh <github-url-or-path> ./security-report standard --commits
    Depth: quick (20 files), standard (50), deep (100 files, more lines each). Flags: --commits (last 50 commits), --secrets-only, --deps-only. Outputs: tech-stack.txt, secrets-findings.txt, dependency-findings.txt, commit-findings.txt, threat-model-prompt.txt, chunk-*.txt, metadata.json.
  2. Check stage completion, not just exit code. Nonzero exit means a stage failed: find which one, rerun it directly (scripts/scan-secrets.sh, scripts/scan-dependencies.sh), and report the wrapper problem separately. An empty findings file only means "clean" if that stage actually finished. TOOL MISSING lines are coverage gaps, not passes.
  3. Threat model. Read threat-model-prompt.txt and write threat-model.md (assets, entry points, auth boundaries, STRIDE per component, top 5 risk areas, naming real files and routes).
  4. Code review. For each chunk-*.txt, apply templates/vulnerability-scan-prompt.md with the threat model as context. Merge results into findings.json ({"findings": [...]}). Open the real file to confirm each High or Critical before keeping it; mark the rest needs-verification.
  5. Triage scanner hits. For each secrets line, open the file and decide: real credential, test fixture, or placeholder. A real credential that was ever committed is leaked: recommend rotation first, history rewrite second.
  6. Report. Fill templates/report-template.md into security-report.md. Severity counts must equal findings.json. Fill "Coverage and limits" honestly.
  7. Clean up. chunk-*.txt contain raw source (and any secrets in it). Delete them, or keep the folder chmod 700, once the review is done.

Severity rules

  • Critical: exploitable now without auth (RCE, auth bypass, live production secret, SQLi on a public route).
  • High: exploitable with a normal account or one precondition (IDOR, stored XSS, SSRF to metadata).
  • Medium: needs unusual conditions or limited impact (missing rate limit on login, permissive CORS with credentials off).
  • Low / Info: hardening and hygiene (headers, outdated but unaffected deps).
  • A dependency advisory is only High or Critical if the vulnerable function is reachable; otherwise say so and drop one level.

Output example (chat summary)

Audited acme/api at standard depth, stages: secrets, deps, commits, review (50 files).
Critical 1, High 2, Medium 3, Low 4.
1. CRITICAL  src/api/pay.js:1  live Stripe secret key committed (also in commit 7e10ec6). Rotate now.
2. HIGH      src/routes/users.ts:88  user id from query, no ownership check (IDOR).
Coverage gaps: osv-scanner not installed, Python deps not scanned.
Report: ./security-report/security-report.md

Incident and change rules

  • Separate stored, rendered as text, executed and compromised. Raw markup in an API proves storage only.
  • Never visit a suspicious payload host or URL. Use passive DNS, WHOIS and reputation services.
  • Preserve evidence before containment. Cancelling events, blocking accounts, rotating credentials, firewall or SSH changes all need explicit approval.
  • On hosts: read-only review first, one layer of change per window, a tested rollback ready, and real post-change health checks. A failing verifier means roll back, even if the service looks fine.

Scheduled scans (optional)

# daily quick scan, weekly deep scan with history
0 2 * * *  bash ~/.claude/skills/security-auditor/scripts/audit-repo.sh /path/to/repo /path/to/reports/daily quick
0 3 * * 0  bash ~/.claude/skills/security-auditor/scripts/audit-repo.sh /path/to/repo /path/to/reports/weekly deep --commits

Cron runs only the deterministic stages; the Claude review step needs a session.

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.

Reviews can't be read right now.

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.