Security Auditor
Finds and fixes common security issues in repositories built by solo founders and small teams.
How It Works
- Scan for hardcoded secrets and credentials
- Check environment variable management
- Audit dependencies for known vulnerabilities
- Review authentication and authorization patterns
- Check for common security misconfigurations
Step-by-Step Procedure
Step 1: Scan for Hardcoded Secrets
# Check for common secret patterns
grep -rn --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --include="*.py" --include="*.env" \
-E "(sk-[a-zA-Z0-9]{20,}|api_key\s*=\s*['\"][^'\"]+|password\s*=\s*['\"][^'\"]+|secret\s*=\s*['\"][^'\"]+|AWS_ACCESS_KEY|PRIVATE_KEY)" . \
| grep -v node_modules | grep -v '.env.example' | head -30
If matches found: flag as critical and recommend moving to environment variables.
Step 2: Check Environment Variable Management
.envshould be in.gitignore(if not: critical).env.exampleshould exist listing all required variables- No
.envfiles committed to git history - Check for
process.env.oros.environusage without defaults
Step 3: Audit Dependencies
For Node.js:
npm audit --production 2>/dev/null || echo "npm audit not available"
For Python:
pip-audit 2>/dev/null || echo "pip-audit not available"
Flag: critical and high severity vulnerabilities.
Step 4: Review Auth Patterns
- Is there authentication? (NextAuth, Clerk, Auth0, Supabase Auth, custom JWT)
- Are API routes protected? Check for middleware/guards
- Are admin routes separated from public routes?
- Is CSRF protection in place for forms?
Step 5: Check Common Misconfigurations
- CORS: Is it set to
*in production? (flag as warning) - Rate limiting: Any on API routes?
- Input validation: Are user inputs sanitized?
- HTTPS: Is the app enforcing HTTPS?
Output Format
## 🔒 Security Audit
### Critical Issues
- {issue}: {location} — {fix}
### Warnings
- {issue}: {location} — {recommendation}
### Good Practices Found
- {practice already in place}
Important
- NEVER print or expose actual secret values in output
- Always recommend
.env+.env.examplepattern - Prioritize: hardcoded secrets > dependency vulns > auth gaps > misconfigs