Set up all Socket security tools for local development.
- AgentShield — scans Claude config for prompt injection and secrets
- Zizmor — static analysis for GitHub Actions workflows
- SFW (Socket Firewall) — intercepts package manager commands to scan for malware
First, ask the user if they have a Socket API key for SFW enterprise features.
If they do:
- Ask them to provide it
- Write it to
.env.localasSOCKET_API_KEY=<their-key>(create if needed) - Verify
.env.localis in.gitignore— if not, add it and warn
If they don't, proceed with SFW free mode.
Then run:
node .claude/hooks/setup-security-tools/index.mtsAfter the script completes, add the SFW shim directory to PATH:
export PATH="$HOME/.socket/sfw/shims:$PATH"- Safe to re-run (idempotent)
- AgentShield needs
pnpm install(it's a devDep) - Zizmor is cached at
~/.socket/zizmor/bin/ - SFW binary is cached via dlx at
~/.socket/_dlx/ - SFW shims are shared across repos at
~/.socket/sfw/shims/ .env.localmust NEVER be committed/updatewill check for new versions of these tools vianode .claude/hooks/setup-security-tools/update.mts