Security Review

SkillCloud & infra

Comprehensive security audit for authentication, input validation, secrets, and API security. Use for pre-deployment audits or targeted security analysis.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Security Review skill

What this skill tells your AI

The instructions your AI receives, as published by incubateur-ademe/benefriches in .claude/skills/security-review/SKILL.md and read by ahel’s review.

Perform a comprehensive security audit of code changes or specified files.

Instructions

1. Determine Scope

If $ARGUMENTS provided, review those specific files/directories. Otherwise, review recent changes with git diff (or git diff HEAD~1 if no uncommitted changes).

2. Load Security Rules

Read .claude/context/security/security-rules.md for the complete security checklist.

3. Run Automated Scans

# Dependency vulnerabilities
pnpm -r audit

Use Grep to search for secret patterns listed in security-rules.md section 1.

Search for vulnerability patterns:

PatternWhat It FindsFiles to Check
.raw( without ?SQL injection*.repository.ts, *Query.ts
whereRaw( without bindingsSQL injectionSame
dangerouslySetInnerHTMLXSS*.tsx
eval(Code injection*.ts, *.js
child_process.exec with variablesCommand injection*.ts
console.log with sensitive contextData exposureAuth-related files
Missing @UseGuardsAuth bypass*.controller.ts

4. Apply Security Rules

Apply all 11 rule sections from security-rules.md to the scoped code:

  1. Secrets Management (CRITICAL)
  2. Input Validation (CRITICAL)
  3. SQL Injection Prevention (CRITICAL)
  4. Authentication & Authorization (CRITICAL)
  5. XSS Prevention (HIGH)
  6. CSRF Protection (HIGH)
  7. Rate Limiting (HIGH)
  8. Sensitive Data Exposure (HIGH)
  9. Dependency Security (HIGH)
  10. API Security (HIGH)
  11. Database Security (HIGH)

Then evaluate against the OWASP Top 10 checklist and Benefriches-specific checks.

5. Report Format

For each finding:

### [SEVERITY] Finding Title

**File:** path/to/file.ts:line
**Category:** OWASP A0X - Category Name
**Description:** What the vulnerability is
**Impact:** What could happen if exploited
**Remediation:** How to fix it

// Vulnerable code
<code snippet>

// Fixed code
<code snippet>

Severity Levels:

  • CRITICAL: Exploitable vulnerabilities, data exposure, auth bypass
  • HIGH: Security weaknesses requiring immediate attention
  • MEDIUM: Defense-in-depth improvements
  • LOW: Best practice recommendations

6. Summary

End with:

## Security Review Summary

### Scan Results
- Dependency Audit: X vulnerabilities (X critical, X high, X moderate)
- Secret Scan: X potential secrets found
- Pattern Scan: X suspicious patterns

### Findings by Severity
- Critical: X
- High: X
- Medium: X
- Low: X

### Verdict

✅ **PASS** - No critical or high severity issues
⚠️ **REVIEW NEEDED** - Medium issues require attention before production
❌ **BLOCK** - Critical/high issues must be fixed before deployment

Pre-Deployment Checklist

Before deploying to production, verify:

  • pnpm -r audit shows no critical/high vulnerabilities
  • No hardcoded secrets in codebase
  • All API endpoints have appropriate authentication
  • All user input is validated with Zod schemas
  • Database queries use parameterized queries only
  • Error messages don't expose internal details
  • Security headers are configured
  • Rate limiting is enabled
  • Logging doesn't include sensitive data
  • File uploads are validated and sanitized

Scope

$ARGUMENTS

If no scope provided, review all uncommitted changes.

Signals

GitHub stars
45
Forks
3
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
security-review-incubateur-ademe
Source
github.com/incubateur-ademe/benefriches