The command line
bulwarkctl is one file with every check built in. Copy it anywhere and run it. The report is short on purpose: the problems worth fixing first, worst first, each with why and how.
$ bulwarkctl ai scanBulwark 0.14.0 · AI coding agents · 1 project · 3 agent files checked 4 problems to fix 1 critical · 3 high ● Critical Project-supplied agent hooks run shell commands automatically This project settings file defines hooks. Claude Code hooks run shell commands automatically on tool/session events — a project-supplied hook can execute … → Remove the hooks from the repository's agent config (for example the hooks block in .claude/settings.json, .cursor/hooks.json, .kiro/hooks/, or a … in: ~/Projects/api/.claude/settings.json:1 more: https://bulwark.nrl.ai/checks/blwk-ai-002 ● High Anthropic API key exposed in AI context Anything written into an assistant's context, memory, or transcript should be treated as leaked — rotate it. → Remove the key from the file and replace it with a new one. Anything pasted into an AI chat should be treated as leaked. in: ~/.claude/projects/api/session.jsonl:1 more: https://bulwark.nrl.ai/checks/blwk-ai-001 ● High An MCP server runs an unpinned package from a registry MCP server "fs" launches an unpinned package via npx. Without a pinned version it runs whatever the registry serves next, with your granted tool permissions. → Pin the MCP server to an exact version so it can't change without you knowing. in: ~/Projects/api/.mcp.json:1 more: https://bulwark.nrl.ai/checks/blwk-ai-003 … → 1 agent file holds leaked secrets Bulwark can remove — preview with bulwarkctl ai redact, then add --apply→ Removing a secret from a file doesn't make it safe again: rotate it with its provider.
Commands
| Command | What it does |
|---|---|
bulwarkctl ai scan | AI agent settings and keys leaked into agent files, across your projects |
bulwarkctl ai scan --target . | The same, for this repository only |
bulwarkctl scan | This computer: SSH, firewall, exposed services, persistence, malware signs |
sudo bulwarkctl scan --privileged | Adds the checks that read root-only files |
bulwarkctl scan --ssh user@host | A server, over the SSH you already use. More → |
bulwarkctl logs scan | Signs of attack in system logs: brute force, root logins, sudo abuse |
bulwarkctl fix list | Preview every fix for this computer |
bulwarkctl ai redact | Preview removing leaked keys from agent files |
bulwarkctl agent install | Give your AI coding agents the Bulwark skill. More → |
Every fix and redaction only previews until you add --apply. Add --all to any scan to see low-priority items and every place a problem was found.
In scripts and CI
--json prints the full result. The exit code is 0 when nothing medium or worse is open, 1 for medium or high, and 2 for critical:
bash
bulwarkctl ai scan --target . || echo "fix the agent setup before merging"