Seatbelt

Zero-config security scanning for vibe coders. Seatbelt is a Claude Code plugin that automatically scans your staged changes before every git commit.
What it does
Seatbelt intercepts git commit commands and runs eight security scanners on your staged changes:
| Scanner | What it checks | Fail mode |
|---|
| gitleaks | Hardcoded secrets, API keys, credentials | BLOCK — commit is prevented |
| checkov | IaC misconfigurations (Dockerfile, Terraform, k8s, Helm, GitHub Actions, docker-compose) | BLOCK — commit is prevented |
| trivy | Dependency CVEs in lock files (HIGH/CRITICAL severity) | warn — findings shown, commit allowed |
| zizmor | GitHub Actions workflow security issues (injection, unpinned actions) | warn — findings shown, commit allowed |
| semgrep | Code-level security bugs (SQL injection, XSS, command injection) | warn — findings shown, commit allowed |
| shellcheck | Shell script quality and correctness issues | warn — findings shown, commit allowed |
| commitlint | Conventional commit message format (advisory) | warn — findings shown, commit allowed |
| signing | Commit signing reminder (advisory) | warn — findings shown, commit allowed |
You don't need all eight installed. Scanners that aren't found are skipped with a warning like:
SEATBELT DEGRADED: gitleaks not installed — secret scanning DISABLED (brew install gitleaks | /seatbelt:setup)
Install any combination you want — Seatbelt works with one scanner or all eight.
Install
Add the marketplace and install the plugin, then let seatbelt guide you through scanner setup:
claude plugin marketplace add chris-yyau/seatbelt
claude plugin install seatbelt@seatbelt
Then run setup inside Claude Code:
/seatbelt:setup
/seatbelt:setup detects what's missing, proposes install commands grouped by package manager, then executes them immediately and runs smoke tests to verify everything works.
Manual Install
If you prefer to install scanner binaries yourself:
# macOS (recommended: install all)
brew install gitleaks checkov trivy zizmor semgrep shellcheck
# Linux (brew if available, otherwise pip3/releases)
brew install gitleaks checkov trivy zizmor semgrep shellcheck
# Or without brew:
# gitleaks: https://github.com/gitleaks/gitleaks/releases
# trivy: https://aquasecurity.github.io/trivy/latest/getting-started/installation/
# checkov: pip3 install checkov
# zizmor: pip3 install zizmor (or cargo install zizmor)
# semgrep: pip3 install semgrep
# shellcheck: https://github.com/koalaman/shellcheck/releases
How it works
Seatbelt registers PreToolUse hooks on the Bash tool. Each hook checks if the command is a git commit and exits immediately if not — non-commit commands have near-zero overhead.
When a git commit is detected, seatbelt uses two approaches to scan staged content:
- gitleaks reads the git staging area directly via its
--staged flag
- checkov, trivy, zizmor, semgrep, shellcheck extract staged file content to a temp directory via
git show, then scan the extracted files. This ensures scanners see exactly what will be committed, not the current working tree.
- commitlint validates the commit message format against conventional commit rules
- signing checks whether
commit.gpgsign is configured in git
All eight scanner hooks share a common commit-detection library (hooks/scripts/lib/detect-commit.sh) that parses Claude Code's hook input JSON to determine if the command is a git commit. Non-commit commands are ignored with near-zero overhead.
If you use partial staging (git add -p), seatbelt scans exactly the hunks you staged.
Architecture
Claude Code Seatbelt Plugin
─────────── ───────────────