agentleFS
thixpinthixpin/claude-config/skills/security-audit/SKILL.md

security-audit

Skill8 starsChanged 4 months agoMITView on GitHub

Security review and hardening workflow — root-cause analysis of vulnerabilities, authentication and authorization checks, least privilege, input handling, secret hygiene, and security regression tests. Use when reviewing code for security, fixing a vulnerability, hardening a feature, or handling auth, permissions, secrets, or untrusted input. For a quick automated pass on pending changes, the built-in /security-review also exists; this skill defines the standards to apply.

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

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 118 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Search for the same pattern elsewhere in the codebase.

    line 23
  2. Distinctive:

    Never "fix" a security finding by hiding the symptom (suppressing the error, filtering the payload string, disabling the scanner rule).

    line 24
  3. Distinctive:

    Every non-public endpoint/entry point verifies identity server-side.

    line 28
  4. Distinctive:

    All input from outside the trust boundary (users, other services, files, headers, webhooks) is validated at entry, then handled with safe …

    line 45
  5. Distinctive:

    No secrets in source, config committed to VCS, or client-delivered code.

    line 50
  6. Distinctive:

    Every fixed vulnerability gets a test proving the exploit path is closed (e.g., the unauthorized request now returns 403, the injection …

    line 55

“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

Fix causes, not symptoms; verify every trust boundary; leave a regression test behind.

Scope

Use for anything touching a trust boundary: security review, fixing a vulnerability, hardening a feature, or writing code that handles auth, permissions, secrets, or untrusted input.

Do not use for:

  • General code quality with no security dimension — use code-quality-review.
  • A quick automated pass over pending changes — the built-in /security-review does that. This skill defines the standards to apply.

Used alongside: fixing a vulnerability follows the bug-fix workflow with this skill's checklist; IAM policies and secrets inside Terraform apply terraform-review and this skill together.

Root cause discipline

  • For any vulnerability, identify the trust failure behind it (unvalidated input, missing authorization, confused deputy, secret in the wrong place) — then fix that, not just the reported instance.
  • Search for the same pattern elsewhere in the codebase; vulnerabilities ship in families.
  • Never "fix" a security finding by hiding the symptom (suppressing the error, filtering the payload string, disabling the scanner rule).

Authentication

  • Every non-public endpoint/entry point verifies identity server-side; client-side checks are UX, never enforcement.
  • Credentials: hashed with a modern KDF (bcrypt/argon2), never logged, never in URLs; sessions/tokens expire, rotate on privilege change, and invalidate on logout.
  • Auth failures are uniform (no user-enumeration via differing errors/timing) and rate-limited.

Authorization

  • Authorization is checked on every request at the resource level — object ownership, not just role ("can this user access this record", not "is this user logged in"). Missing object-level checks (IDOR) are the most common real-world hole.
  • Deny by default; new endpoints and routes require an explicit permission decision.
  • Enforcement lives server-side in one place (middleware/policy layer), not copy-pasted per handler.

Least privilege

  • Code, services, tokens, and DB accounts get the minimum scope that works: read-only where read-only suffices, scoped tokens over master keys, short-lived over long-lived.
  • New dependencies and integrations reviewed for what access they actually require.

Input & data handling

  • All input from outside the trust boundary (users, other services, files, headers, webhooks) is validated at entry, then handled with safe primitives: parameterized queries, context-aware output encoding, safe deserializers, path canonicalization before filesystem access.
  • Sensitive data (credentials, tokens, PII) excluded from logs, error messages, and stack traces shown to clients.

Secrets

  • No secrets in source, config committed to VCS, or client-delivered code; use the project's secret store or environment mechanism.
  • A secret that was ever committed is compromised: rotation is the fix, deletion from history is cleanup.

Security regression tests

  • Every fixed vulnerability gets a test proving the exploit path is closed (e.g., the unauthorized request now returns 403, the injection payload is inert).
  • Authorization rules get negative tests: the wrong user/role is denied, not merely the right one allowed.

Reporting

  • Report findings with severity based on impact and exploitability, and note explicitly which classes of vulnerability were checked and which were out of scope.

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.