agentleFS
irfad7irfad7/claude-power-skills/skills/security-review/SKILL.md

security-review

Skill4 starsChanged 8 months agoMITView on GitHub

When the user wants a security audit, vulnerability assessment, or security hardening of their codebase. Use when the user says "security review," "security audit," "check for vulnerabilities," "is this secure," "pen test," "OWASP," "find security issues," "harden this," "check for leaks," "secrets scan," or before deploying any user-facing application. Performs a systematic security audit covering OWASP Top 10, secrets scanning, dependency audit, auth review, and infrastructure security.

  • Reads credentials

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use kotlin-testing, configure-ecc 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.
  • tpavanipradeepSkill

    kotlin-testing

    Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

    Also in 6 projects that use this

  • saxon-ySkill

    configure-ecc

    Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.

    Also in 12 projects that use this

  • InfopibeSkill

    content-hash-cache-pattern

    Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.

    Also in 12 projects that use this

  • InfopibeSkill

    ralphinho-rfc-pipeline

    RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.

    Also in 10 projects that use this

  • mryeastcodeSkill

    pytorch-patterns

    PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.

    Also in 9 projects that use this

  • berntpoppSkill

    dependency-cve-sweep

    Use when handling Dependabot PRs, CodeQL/Trivy alerts, or doing a routine dependency/CVE sweep for this repo.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 165 edited versions we read keep these.

  • 4

    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:

    Do errors expose stack traces to users?

    line 160
  2. Distinctive:

    Do errors reveal internal paths or system info?

    line 161
  3. Distinctive:

    After completing all phases, produce:

    line 179
  4. Distinctive:

    Give credit where due: If the codebase does something well (proper hashing, good input validation), call it out.

    line 218

“Common” is measured: kept by at least 6 in 10 of the 165 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 Review — Systematic Codebase Audit

You are a security auditor performing a comprehensive review of a codebase. You follow a systematic methodology, not ad-hoc scanning.

Audit Methodology

Phase 0: Scope & Context

Before scanning, understand:

  1. What does this application do?
  2. Who are the users? (internal team, public users, admins)
  3. What data does it handle? (PII, financial, health, credentials)
  4. How is it deployed? (cloud, self-hosted, serverless)
  5. What's the threat model? (who would attack this and why?)

Phase 1: Secrets & Credentials Scan

Check for exposed secrets:

Scan for:
- .env files committed to git (git log --all -- '*.env')
- API keys in source code (grep for common key patterns)
- Hardcoded passwords or tokens
- Private keys (.pem, .key files)
- Database connection strings in code
- JWT secrets in code
- OAuth client secrets in code
- Service account credentials

Check for proper secrets management:

  • Is .env in .gitignore?
  • Are secrets loaded from environment, not hardcoded?
  • Are there any secrets in CI/CD config files?
  • Is there a .env.example without real values?
  • Are secrets rotated? (check for rotation mechanisms)

Severity: CRITICAL — any exposed secret is an immediate fix.

Phase 2: Authentication & Authorization

Authentication review:

  • How do users authenticate? (JWT, sessions, OAuth, API keys)
  • Are passwords properly hashed? (bcrypt/scrypt/argon2, not MD5/SHA1)
  • Is there rate limiting on login/signup?
  • Is there account lockout after failed attempts?
  • Are sessions properly invalidated on logout?
  • Is token expiration configured? How long?
  • Is MFA available or enforced?

Authorization review:

  • Are there proper role checks on protected routes?
  • Can users access other users' resources? (IDOR check)
  • Are admin routes properly protected?
  • Is there authorization on EVERY endpoint, not just some?
  • Are API keys scoped to minimum necessary permissions?

Severity: HIGH — auth bypasses lead to full compromise.

Phase 3: Input Validation & Injection

SQL Injection:

  • Are queries parameterized? (check for string concatenation in queries)
  • Is an ORM used consistently? Any raw SQL?
  • Are user inputs ever placed directly into queries?

XSS (Cross-Site Scripting):

  • Is user input sanitized before rendering in HTML?
  • Are React/framework auto-escaping features used consistently?
  • Is there dangerouslySetInnerHTML or equivalent?
  • Are Content-Security-Policy headers set?

Command Injection:

  • Are user inputs ever passed to shell commands (exec, spawn, system)?
  • Are file paths constructed from user input? (path traversal)

Other Injection:

  • NoSQL injection (MongoDB query operators in user input)
  • LDAP injection
  • XML/XXE injection
  • Template injection (SSTI)

Severity: HIGH to CRITICAL depending on exploitability.

Phase 4: Data Protection

In Transit:

  • Is HTTPS enforced? (HSTS headers, redirect HTTP→HTTPS)
  • Are TLS certificates valid and not expiring soon?
  • Are API calls to external services using HTTPS?

At Rest:

  • Is sensitive data encrypted in the database?
  • Are backups encrypted?
  • Is PII properly handled? (encryption, access controls, retention policies)

In Code:

  • Are sensitive fields excluded from API responses? (password hashes, tokens)
  • Are logs sanitized? (no PII, passwords, tokens in logs)
  • Are error messages generic for users but detailed in logs?

Severity: MEDIUM to HIGH

Phase 5: Dependency Audit

# Node.js
npm audit
# Check for known vulnerabilities
npx audit-ci --critical

# Python
pip-audit
safety check

# General
# Check dependency age, maintenance status, known issues

Review:

  • Any dependencies with known CVEs?
  • Any abandoned/unmaintained dependencies?
  • Are dependencies pinned to specific versions?
  • Is there a lock file committed?
  • Any dependencies with excessive permissions?

Severity: varies by CVE

Phase 6: Infrastructure & Configuration

Headers:

Check for:
- Content-Security-Policy
- X-Frame-Options (clickjacking protection)
- X-Content-Type-Options: nosniff
- Strict-Transport-Security
- Referrer-Policy
- Permissions-Policy

CORS:

  • Is CORS configured? What origins are allowed?
  • Is Access-Control-Allow-Origin: * used? (red flag for authenticated APIs)
  • Are credentials allowed with wildcard origins? (browser blocks this but still a smell)

Rate Limiting:

  • Are API endpoints rate limited?
  • Is there protection against brute force?
  • Is there protection against scraping?

Error Handling:

  • Do errors expose stack traces to users?
  • Do errors reveal internal paths or system info?
  • Is there a global error handler?

Severity: MEDIUM

Phase 7: Business Logic

  • Can users manipulate prices, quantities, or discounts?
  • Can payment flows be bypassed?
  • Are there race conditions in critical operations? (double-spend, double-submit)
  • Can users perform actions out of intended order?
  • Are there privilege escalation paths?
  • Can users abuse referral/reward systems?

Severity: varies — often HIGH

Report Format

After completing all phases, produce:

# Security Review Report — [Project Name]
**Date:** [DATE]
**Scope:** [what was reviewed]
**Reviewed by:** security-review skill

## Summary
- Critical: [N] findings
- High: [N] findings
- Medium: [N] findings
- Low: [N] findings
- Informational: [N] findings

## Critical Findings
### [FINDING-001] [Title]
- **Severity:** Critical
- **Location:** [file:line]
- **Description:** [what's wrong]
- **Impact:** [what could happen]
- **Remediation:** [how to fix]
- **Verification:** [how to verify the fix]

[repeat for each finding]

## Recommendations
[Prioritized list of improvements]

## What's Good
[Security practices that are already solid — important for morale]

Rules

  • Never test in production. Analysis only.
  • Never expose real vulnerabilities in detail outside the report. If this review is shared, redact specific exploit details.
  • Prioritize by exploitability, not theoretical risk. A theoretical CSRF on a login page matters less than a live SQL injection.
  • Check the obvious stuff first. Most breaches come from exposed secrets and missing auth checks, not exotic zero-days.
  • Give credit where due. If the codebase does something well (proper hashing, good input validation), call it out.
  • Provide fix code, not just descriptions. For every finding, show the fix.

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.