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

58 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 9 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

  • adrianpuiuSkill

    project-planner

    Comprehensive project planning and documentation generator for software projects. Creates structured requirements documents, system design documents, and task breakdown plans with implementation tracking. Use when starting a new project, defining specifications, creating technical designs, or breaking down complex systems into implementable tasks. Supports user story format, acceptance criteria, component design, API specifications, and hierarchical task decomposition with requirement traceability.

    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 51 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 51 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.