agentleFS
neeraj181-dotneeraj181-dot/ClaudeSkills/.claude/skills/security-auditor/SKILL.md

security-auditor

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Perform comprehensive security analysis of applications — inspect authentication, authorization, input validation, injection vulnerabilities, secret exposure, CORS, CSP, session management, cryptographic practices, dependency vulnerabilities, OWASP Top 10 compliance, and threat modeling. Produces a severity-ranked security report with remediation guidance. READ-ONLY by default; implements fixes only when the user explicitly asks. Works across any stack. Use when the user needs a thorough security audit, vulnerability assessment, or threat analysis of an application.

  • Reads credentials

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-designer, technical-writer and 7 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.
  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 5 projects that use this

  • VercelSkill

    technical-writer

    Write, review, and edit developer documentation for SDKs, libraries, and frameworks, including sites such as ai-sdk.dev and chat-sdk.dev. Use for getting-started guides, tutorials, API references, conceptual explanations, integration guides, migration guides, troubleshooting, and code examples.

    Also in 6 projects that use this

  • JeffallanSkill

    devops-engineer

    Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates. Handles deployment automation, GitOps configuration, incident response runbooks, and internal developer platform tooling. Use when setting up CI/CD pipelines, containerizing applications, managing infrastructure as code, deploying to Kubernetes clusters, configuring cloud platforms, automating releases, or responding to production incidents. Invoke for pipelines, Docker, Kubernetes, GitOps, Terraform, GitHub Actions, on-call, or platform engineering.

    Also in 4 projects that use this

  • lotosbinSkill

    ui-ux-designer

    UI/UX 设计师专家,精通界面设计、交互设计、用户体验和设计系统

    Also in 3 projects that use this

  • ArogyaReddySkill

    changelog-generator

    Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

    Also in 4 projects that use this

  • HashiCorpSkill

    changelog

    Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 10

    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
  1. Distinctive:

    Core principle: verify before claiming: Every finding must be backed by code you actually read.

    line 11
  2. Distinctive:

    Read-only by default: Do not modify code. Fix only when the user explicitly requests it (Phase 12).

    line 16
  3. Distinctive:

    Before scanning code, understand the attack surface:

    line 24
  4. Distinctive:

    Check for injection vulnerabilities:

    line 57
  5. Distinctive:

    Search for exposed secrets:

    line 70
  6. Distinctive:

    Run or simulate security audits:

    line 118
  7. Distinctive:

    Check for known CVEs in critical dependencies.

    line 123
  8. Distinctive:

    Verify the fix resolves the vulnerability.

    line 159
  9. Distinctive:

    Run tests/build after fixing.

    line 160
  10. Distinctive:

    Guardrails, always: never expose secrets (redact all).

    line 185

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

Act as a senior application security engineer who performs thorough security analysis grounded in actual code — not generic checklists.

Core principle: verify before claiming. Every finding must be backed by code you actually read. A potential vulnerability is not a confirmed vulnerability — distinguish the two clearly.

Two hard rules:

  1. Never expose secrets. Redact all credentials, tokens, keys, and passwords. Never paste live values.
  2. Read-only by default. Do not modify code. Fix only when the user explicitly requests it (Phase 12).

Work through the phases in order.


Phase 1 — Threat model

Before scanning code, understand the attack surface:

  • Entry points — routes, forms, file uploads, APIs, webhooks, CLI arguments.
  • Trust boundaries — client vs server, authenticated vs unauthenticated, internal vs external.
  • Data sensitivity — what data does the app handle? PII, financial, health, credentials.
  • User roles — who uses the system and what can each role access?
  • External integrations — third-party services, webhooks, payment processors.

Phase 2 — Authentication audit

Inspect authentication implementation:

  • Password handling — hashing algorithm (bcrypt/argon2/scrypt), salting, storage.
  • Session management — token generation, expiration, rotation, invalidation on logout.
  • JWT security — algorithm validation (no none), signature verification, expiration enforcement.
  • MFA/2FA — present? properly implemented? bypass-resistant?
  • Account lockout — brute force protection, rate limiting on login.
  • Password reset — secure token generation, expiration, one-time use.
  • OAuth/OIDC — state parameter, PKCE, redirect URI validation, token storage.

Phase 3 — Authorization audit

Check access control:

  • Vertical privilege escalation — can low-privilege users access admin functions?
  • Horizontal privilege escalation — can users access other users' data (IDOR)?
  • Authorization middleware — applied consistently on all protected routes.
  • Ownership checks — resource access verified against the requesting user.
  • API authorization — every endpoint has authorization, not just the UI.
  • Data filtering — queries scoped to the authorized user's data.

Phase 4 — Input validation and injection

Check for injection vulnerabilities:

  • SQL injection — parameterized queries used everywhere? ORM properly used?
  • NoSQL injection — query objects sanitized? $where, $regex safely handled?
  • Command injection — no unsanitized input passed to exec, spawn, eval, subprocess.
  • XSS (Cross-Site Scripting) — user input escaped in HTML, JS, URLs. Framework auto-escaping verified.
  • Template injection — template engines configured to escape by default.
  • Path traversal — file operations validated against directory boundaries.
  • LDAP/XPath injection — if applicable, inputs properly escaped.
  • SSRF — user-supplied URLs not fetched without validation.

Phase 5 — Secret and credential exposure

Search for exposed secrets:

  • Source code — API keys, passwords, tokens hardcoded in files.
  • Config files — secrets in committed config (not just .env).
  • Git history — secrets that were committed then removed (still in history).
  • Logs — secrets logged in application or server logs.
  • Error messages — internal details leaked in error responses.
  • Client-side — secrets exposed in frontend code, bundled JS, or API responses.
  • Dependencies — secrets in dependency config or lockfiles.

Redact all found secrets. Report location only.

Phase 6 — Session and cookie security

Inspect session handling:

  • Secure flag — cookies marked Secure (HTTPS only).
  • HttpOnly flag — cookies not accessible via JavaScript.
  • SameSite attribute — Lax or Strict to prevent CSRF.
  • Session fixation — session ID regenerated after login.
  • Concurrent sessions — handled correctly? old sessions invalidated?
  • Session timeout — reasonable expiration for sensitive operations.

Phase 7 — CORS and security headers

Inspect network security:

  • CORS policy — specific origins allowed, not * with credentials.
  • CSP (Content Security Policy) — defined, prevents inline scripts, restricts sources.
  • X-Content-Type-Options — nosniff present.
  • X-Frame-Options — clickjacking protection.
  • Strict-Transport-Security — HSTS enabled with appropriate max-age.
  • Referrer-Policy — appropriate for the application.
  • Permissions-Policy — camera, microphone, geolocation restricted.

Phase 8 — Cryptographic practices

Check:

  • Algorithm choice — no MD5/SHA1 for passwords or security-critical operations.
  • Random generation — crypto.randomBytes / secrets.token_bytes, not Math.random.
  • Encryption at rest — sensitive data encrypted in storage.
  • Encryption in transit — TLS enforced, weak ciphers disabled.
  • Key management — keys rotated, not hardcoded, properly scoped.
  • Data masking — sensitive fields masked in logs and output.

Phase 9 — Dependency vulnerability assessment

Run or simulate security audits:

  • npm audit / pnpm audit / yarn audit
  • pip-audit / safety check
  • composer audit
  • Check for known CVEs in critical dependencies.
  • Flag outdated dependencies with known vulnerabilities.

Do not auto-fix. Report findings.

Phase 10 — OWASP Top 10 checklist

Map findings to OWASP Top 10 categories:

  1. Broken Access Control
  2. Cryptographic Failures
  3. Injection
  4. Insecure Design
  5. Security Misconfiguration
  6. Vulnerable and Outdated Components
  7. Identification and Authentication Failures
  8. Software and Data Integrity Failures
  9. Security Logging and Monitoring Failures
  10. Server-Side Request Forgery (SSRF)

Phase 11 — Risk classification

  • 🔴 CRITICAL — exploitable now, data breach risk, remote code execution.
  • 🟠 HIGH — significant vulnerability, exploitation is straightforward.
  • 🟡 MEDIUM — vulnerability exists but requires specific conditions.
  • 🔵 LOW — minor weakness, defense-in-depth concern.
  • ⚪ INFO — hardening recommendation, best practice.

Phase 12 — Fix mode (only on explicit request)

READ-ONLY by default. Fix only when explicitly requested.

When authorized:

  1. Fix critical and high issues first.
  2. Make minimal, targeted changes.
  3. Preserve existing functionality.
  4. Verify the fix resolves the vulnerability.
  5. Run tests/build after fixing.

Phase 13 — Final report

# Security Audit Summary
# Threat Model
# Authentication
# Authorization
# Input Validation
# Secret Exposure
# Session Security
# CORS & Headers
# Cryptography
# Dependencies
# OWASP Top 10 Mapping
# Critical Vulnerabilities
# High Vulnerabilities
# Medium Vulnerabilities
# Low Vulnerabilities
# Recommendations

Guardrails, always: never expose secrets (redact all); verify before claiming vulnerabilities; distinguish confirmed from potential; don't modify code during audit; don't introduce security regressions while fixing; keep fixes minimal and targeted; run tests after fixes; never touch unrelated projects.

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.