troykelly/claude-skills/security-review

Claude Code and agent skill by troykelly/claude-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

MANDATORY for security-sensitive code changes - OWASP-based security review with dedicated checklist, required before PR for auth, input handling, API, database, or credential code

Install

npx vskill@latest install troykelly/claude-skills/security-review

SKILL.md

Security Review

Overview

Dedicated security review for code handling authentication, authorization, user input, APIs, databases, or credentials.

Core principle: Security issues require specialized attention beyond general code review.

Trigger: This review is MANDATORY when changes touch security-sensitive paths.

Announce at start: "I'm performing a security review of this code."

When Required

This skill is MANDATORY when ANY of these files are modified:

PatternExamples
**/auth/**src/auth/login.ts, lib/auth/session.js
**/security/**src/security/encryption.ts
**/middleware/**src/middleware/authenticate.ts
**/api/**src/api/endpoints.ts
**/*password*utils/passwordHash.ts
**/*token*services/tokenService.ts
**/*secret*config/secrets.ts
**/*credential*lib/credentials.js
**/*session*middleware/session.ts
**/routes/**src/routes/protected.ts
**/*.sqlmigrations/001_users.sql

Check with:

bash
git diff --name-only HEAD~1 | grep -E '(auth|security|middleware|api|password|token|secret|credential|session|routes|\.sql)'

OWASP Top 10 Checklist

Review against each category:

1. Injection (A03:2021)
CheckVerify
SQL InjectionAll queries use parameterized statements
Command InjectionNo user input in shell commands, or properly escaped
LDAP InjectionLDAP queries use proper escaping
XPath InjectionXPath queries use parameterized approach
Template InjectionTemplate engines configured safely
typescript
// VULNERABLE
db.query(`SELECT * FROM users WHERE id = '${userId}'`);
// SECURE
db.query('SELECT * FROM users WHERE id = ?', [userId]);
2. Broken Authentication (A07:2021)
CheckVerify
Password StoragePasswords hashed with bcrypt/argon2 (not MD5/SHA1)
Session ManagementSecure, HttpOnly, SameSite cookies
Token HandlingJWTs signed, validated, short-lived
Brute Force ProtectionRate limiting on auth endpoints
Credential ExposureNo credentials in logs, errors, or responses
3. Sensitive Data Exposure (A02:2021)
CheckVerify
Data in TransitHTTPS enforced, TLS 1.2+
Data at RestSensitive data encrypted
Secrets in CodeNo hardcoded API keys, passwords, tokens
Error MessagesNo sensitive info in error responses
LoggingNo sensitive data logged
bash
# Check for hardcoded secrets
grep -rE '(password|secret|api_key|token)\s*[:=]\s*["\047][^"\047]+["\047]' src/
4. XML External Entities (A05:2021)
CheckVerify
XML ParsingExternal entities disabled
DTD ProcessingDTD processing disabled if not needed
5. Broken Access Control (A01:2021)
CheckVerify
Authorization ChecksEvery endpoint verifies permissions
Direct Object ReferencesObject access validated against user
Privilege EscalationCannot elevate own privileges
CORSProperly restricted origins
Method RestrictionOnly allowed HTTP methods accepted
6. Security Misconfiguration (A05:2021)
CheckVerify
Default CredentialsNo default passwords in use
Error HandlingStack traces not exposed to users
Security HeadersCSP, X-Frame-Options, etc. set
Debug ModeDisabled in production
Unnecessary FeaturesUnused endpoints/features removed
7. Cross-Site Scripting (A03:2021)
CheckVerify
Output EncodingUser input encoded before display
DOM XSSinnerHTML not used with user input
Template SafetyTemplate engine auto-escapes
CSPContent Security Policy configured
typescript
// VULNERABLE
element.innerHTML = userInput;
// SECURE
element.textContent = userInput;
// OR
element.innerHTML = DOMPurify.sanitize(userInput);
8. Insecure Deserialization (A08:2021)
CheckVerify
Object DeserializationUntrusted data not deserialized
JSON ParsingSafe JSON.parse usage
Type ValidationDeserialized objects validated
9. Using Components with Known Vulnerabilities (A06:2021)
CheckVerify
Dependency Auditpnpm audit / pip audit clean
Outdated PackagesNo critically outdated dependencies
CVE CheckNo known CVEs in dependencies
bash
# Run dependency audit
pnpm audit --prod
# or
pip-audit
10. Insufficient Logging & Monitoring (A09:2021)
CheckVerify
Auth EventsLogin success/failure logged
Access ControlPermission denials logged
Input ValidationValidation failures logged
Sensitive ActionsAdmin actions logged
Log IntegrityLogs protected from tampering

Review Process

Step 1: Identify Security-Sensitive Changes
bash
# List changed files matching security patterns
git diff --name-only HEAD~1 | grep -E '(auth|security|middleware|api|password|token|secret|session)'
Step 2: Review Each File

For each security-sensitive file:

  1. Read the entire file (not just diff)
  2. Check against all 10 OWASP categories
  3. Note any findings with severity
Step 3: Check Dependencies
bash
# Audit dependencies
pnpm audit --prod
# Check for outdated
pnpm outdated
Step 4: Document Findings

Use severity levels:

SeverityDescriptionAction
CRITICALExploitable vulnerability, data breach riskMUST fix before merge
HIGHSignificant security weaknessMUST fix before merge
MEDIUMDefense-in-depth issueSHOULD fix before merge
LOWMinor improvementMAY fix in future issue
Step 5: Add Security Section to Review Artifact

Add to the main review artifact:

markdown
### Security Review
**Security-Sensitive:** YES
**Reviewed By:** [WORKER_ID or security-reviewer subagent]
**OWASP Categories Checked:** 10/10
#### Security Findings
| # | OWASP Category | Severity | Finding | Status |
|---|----------------|----------|---------|--------|
| 1 | A03 Injection | CRITICAL | SQL injection in findUser() | FIXED |
| 2 | A02 Sensitive Data | HIGH | API key in config.ts | DEFERRED #456 |
| 3 | A01 Access Control | MEDIUM | Missing auth on /admin | FIXED |
#### Dependency Audit

pnpm audit: 0 vulnerabilities

**Security Review Status:** [PASS|ISSUES_FIXED|ISSUES_DEFERRED]

Security Review Artifact (Standalone)

If security review is extensive, post as separate comment:

markdown
<!-- SECURITY_REVIEW:START -->
## Security Review
| Property | Value |
|----------|-------|
| Issue | #123 |
| Reviewer | `security-reviewer` subagent |
| Reviewed | 2025-12-29T10:30:00Z |
### Files Reviewed
-src/auth/login.ts
-src/middleware/authenticate.ts
-src/api/users.ts
### OWASP Checklist Results
| # | Category | Status | Notes |
|---|----------|--------|-------|
| A01 | Broken Access Control | PASS | Auth middleware on all protected routes |
| A02 | Cryptographic Failures | PASS | bcrypt for passwords, TLS enforced |
| A03 | Injection | FIXED | Parameterized SQL queries now |
| A04 | Insecure Design | PASS | - |
| A05 | Security Misconfiguration | PASS | - |
| A06 | Vulnerable Components | PASS | pnpm audit clean |
| A07 | Auth Failures | PASS | Rate limiting, secure sessions |
| A08 | Data Integrity Failures | PASS | - |
| A09 | Logging Failures | NOTE | Consider adding auth failure logging |
| A10 | SSRF | N/A | No server-side requests |
### Dependency Audit

found 0 vulnerabilities

**Security Review Status:** PASS
<!-- SECURITY_REVIEW:END -->

Checklist

Before completing security review:

  • [ ] All changed security-sensitive files reviewed
  • [ ] All 10 OWASP categories checked
  • [ ] Dependency audit run
  • [ ] All CRITICAL/HIGH findings fixed
  • [ ] Any deferred findings have tracking issues
  • [ ] Security section added to review artifact
  • [ ] Security-Sensitive marked YES in main artifact

Integration

This skill is triggered by:

  • Changes to security-sensitive file patterns
  • Explicit invocation
  • security-reviewer subagent

This skill integrates with:

  • comprehensive-review - Security is criterion #4
  • review-gate - Verifies security review for sensitive changes

This skill is enforced by:

  • .claude/rules/security-sensitive.md conditional rules
  • PreToolUse hook (PR blocked if security-sensitive without review)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
7
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 8 May 2026, 6 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/troykelly/claude-skills/security-review/badge)](https://verified-skill.com/skills/troykelly/claude-skills/security-review)

Something wrong with this skill or its page? Tell us.