Agent skill
Security Audit
Identify and fix security vulnerabilities in code and infrastructure
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/security-audit-agentpoet-agentic-coding-syste
SKILL.md
Security Audit Skill
Identify security vulnerabilities and implement fixes.
Check List
Code Security
- No hardcoded credentials/API keys
- Input validation on all user inputs
- SQL injection prevention (parameterized queries)
- XSS prevention (sanitize outputs)
- CSRF tokens where needed
- Rate limiting on APIs
- Authentication on sensitive routes
- Authorization checks (user permissions)
Database Security
- RLS enabled on ALL tables
- Service role key never exposed to client
- Policies prevent data leaks
- Encrypted connections (SSL/TLS)
Environment Security
-
.env.localin.gitignore - Secrets in environment variables only
- No secrets in logs
- HTTPS in production
Dependencies
- Run
npm audit - Update vulnerable packages
- Review package permissions
Common Vulnerabilities
SQL Injection
// BAD
const query = `SELECT * FROM users WHERE id = ${userId}`;
// GOOD
const { data } = await supabase
.from('users')
.select('*')
.eq('id', userId);
XSS
// BAD
<div dangerouslySetInnerHTML={{__html: userInput}} />
// GOOD
<div>{userInput}</div> // Auto-escaped by React
Credential Leaks
// BAD
const apiKey = "sk-1234567890abcdef";
// GOOD
const apiKey = process.env.API_KEY;
Quick Audit
"Run security audit:
1. Search for hardcoded secrets (grep for 'sk-', 'api_key', etc.)
2. Check .gitignore includes .env*
3. Verify RLS on all tables
4. Run npm audit
5. Check CORS config
Output: temp/security/audit-{timestamp}.md"
Remember: Security is not optional. Audit regularly!
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?