mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
b5c377ae6c
- Add 25+ new secret detection patterns to secret-scanner.py (Anthropic, Google OAuth, GitLab, Vercel, Supabase, Hugging Face, Replicate, Groq, Databricks, Azure, Cloudflare, DigitalOcean, Linear, Notion, Figma, npm, PyPI tokens) - Fix regex escaping in security-scanner.json (single quote matching) - Add skills component type to Discord bot interactions - Add Linear MCP server to .mcp.json - Update .gitignore for opsx commands, skills, and openspec dirs - Regenerate components.json catalog Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
957 B
JSON
16 lines
957 B
JSON
{
|
|
"description": "Scan code for security vulnerabilities and secrets after modifications. Uses multiple security tools to detect potential issues.",
|
|
"hooks": {
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "if command -v semgrep >/dev/null 2>&1; then semgrep --config=auto \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; fi; if command -v bandit >/dev/null 2>&1 && [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.py ]]; then bandit \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; fi; if command -v gitleaks >/dev/null 2>&1; then gitleaks detect --source=\"$CLAUDE_TOOL_FILE_PATH\" --no-git 2>/dev/null || true; fi; if grep -qE '(password|secret|key|token)\\s*=\\s*[\"\\x27][^\"\\x27]{8,}' \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null; then echo \"Warning: Potential hardcoded secrets detected in $CLAUDE_TOOL_FILE_PATH\" >&2; fi"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
} |