README-SKILLS
Command**Objectif**: Savoir où tu en es après une interruption
Run comprehensive security audit on codebase
name: security-audit description: Run comprehensive security audit on codebase category: Security & Quality
Perform comprehensive security analysis using multiple tools and best practices.
Detect security vulnerabilities before they reach production:
Ask user or auto-detect:
🔒 **Security Audit** Scope options: 1. 🎯 Current PRD (feat/PRD-003-design-system) 2. 📦 Entire codebase 3. 📂 Specific directory Select scope: (1-3)
Run npm/yarn audit:
npm audit --json > .claude/security-audit-deps.json npm audit
Parse results:
Run ESLint with security plugins:
npx eslint . \ --ext .js,.jsx,.ts,.tsx \ --config .eslintrc.security.json \ --format json > .claude/security-audit-code.json
Check for:
Scan for hardcoded secrets:
# Pattern-based detection grep -r -E "(api[_-]?key|password|secret|token)[\s]*=[\s]*['\"][^'\"]+['\"]" \ --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" \ --exclude-dir=node_modules \ --exclude-dir=.git \ .
Common patterns to detect:
Validate:
🔒 **Security Audit Report - PRD-003: Design System** **Date**: 2025-10-25 **Scope**: feat/PRD-003-design-system branch **Duration**: 45 seconds --- ## 🚨 Critical Issues (0) ✅ No critical vulnerabilities found --- ## ⚠️ High Severity (2) ### 1. Dependency Vulnerability: lodash@4.17.20 - **Severity**: High - **CVE**: CVE-2021-23337 - **Impact**: Prototype pollution - **Affected**: `packages/ui/package.json` - **Fix**: `npm install lodash@4.17.21` ### 2. Hardcoded API URL - **File**: `packages/ui/src/utils/api.ts:12` - **Issue**: Hardcoded production API URL - **Risk**: Exposed internal endpoint - **Fix**: Move to environment variable ```typescript // ❌ Current (line 12) const API_URL = "https://internal-api.acmecorp.com/v1"; // ✅ Recommended const API_URL = process.env.NEXT_PUBLIC_API_URL;
---
---
---
| Category | Status | Notes | |----------|--------|-------| | Secrets Management | ⚠️ Partial | Some hardcoded values found | | HTTPS Enforcement | ✅ Pass | All external calls use HTTPS | | Input Validation | ⚠️ Partial | Missing in 3 components | | Authentication | ✅ Pass | JWT properly implemented | | Authorization | ✅ Pass | RBAC correctly applied | | Error Handling | ✅ Pass | No sensitive data in errors | | Dependency Updates | ⚠️ Needs Update | 2 high-severity deps |
---
**Overall Grade**: B- (needs improvement)
**Action Required**: Fix 2 high-severity issues before PR merge
---
1. ✅ Update lodash to 4.17.21: `npm install lodash@4.17.21` 2. ✅ Move API_URL to environment variable
3. Add input sanitization to Input component 4. Strengthen password validation 5. Restrict CORS to specific domains
6. Add security headers 7. Remove console.logs from production 8. Implement rate limiting 9. Add CSRF tokens
---
Would you like me to fix the high-severity issues automatically? (Y/n)
### Step 7: Offer Auto-Fix If user approves, automatically fix: - Update vulnerable dependencies - Move hardcoded values to `.env` - Add basic sanitization - Update `.gitignore` if needed Commit changes: ```bash git add . git commit -m "security: Fix high-severity vulnerabilities - Updated lodash to 4.17.21 (CVE-2021-23337) - Moved hardcoded API URL to environment variable - Added input sanitization to Input component 🤖 Generated by /security-audit"
Save to `.claude/security-audit-{date}.md` for historical tracking.
Uses these config settings:
{
"security": {
"enabled": true,
"scan_dependencies": true,
"scan_code": true,
"fail_on_high_severity": true,
"ignore_patterns": [
"**/node_modules/**",
"**/dist/**"
],
"tools": {
"npm_auThe complete Claude Code plugin for Product-Driven Development Transform PRDs from ideas to shipped features with AI-powered review, guided implementation, and automated quality gates. Never ship unclear requirements again.
**Objectif**: Savoir où tu en es après une interruption
4-phase Context Engineering workflow with guided implementation
Complete and close a PRD after PR is merged to production
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.