
Bulwark
io.github.bpolaniaPublished by GitHub account bpolaniav0.2.0Updated Oct 24, 2026
AI agent governance: content scanning, audit logs, policy evaluation, session management.
Overview
Bulwark is a local governance gateway that sits between AI agents and upstream MCP or HTTP tools, enforcing policies, injecting credentials, inspecting content,
- What you can do
- Govern tool calls through a policy engine that allows or denies actions by rule, scope and priority, with hot-reload and replay testing against audit history.
- When to use it
- Use it when you connect agents such as Claude Code, Codex or other MCP/HTTP clients to external tools and need policy enforcement, credential isolation, content scanning, rate limits and an audit trail in one place. It suits teams that must show what agents did and block destructive actions.
- Requirements
- Runs as a local process (Docker image, Homebrew, or built from source with Cargo). Needs a bulwark.yaml configuration file, set via BULWARK_CONFIG. Operator authentication uses a session token in BULWARK_SESSION_TOKEN, created with the session command. Upstream servers may need their own tokens, and the GitHub example needs Node.js/npm.
Installation
In SourceWeft
- Open Bulwark in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Bulwark
Open-source governance layer for AI agents.
Bulwark sits between AI agents and external tools, enforcing policies, managing credentials, inspecting content, and maintaining a complete audit trail. One policy governs all your agents — Claude Code, OpenClaw, Codex, or any MCP/HTTP client.
Why Bulwark?
AI agents are powerful but ungoverned. They can access any tool, leak any credential, and leave no audit trail. Bulwark fixes this:
- Policy enforcement — YAML-based rules control which tools agents can use, with glob patterns, scope-based precedence, and hot-reload
- Credential management — Agents never see real secrets. Bulwark injects credentials at the last mile, encrypted at rest with age
- Content inspection — Scan requests and responses for secrets, PII, and prompt injection. Block or redact automatically
- Audit logging — Every action recorded in a tamper-evident SQLite database with blake3 hash chains
- Rate limiting — Token-bucket rate limits per session, operator, tool, or globally. Cost tracking with budget enforcement
- MCP-native — Works as an MCP gateway or HTTP forward proxy. Governance metadata on every tool call response
Install
Quick Start: Govern Claude Code with GitHub
This walkthrough connects Claude Code to GitHub through Bulwark. Every tool call is policy-evaluated, audited, and credential-injected — in about 5 minutes.
Prerequisites: Claude Code installed, a GitHub personal access token, and Node.js/npm (for the GitHub MCP server).
1. Initialize and verify
doctor runs 9 diagnostic checks. All should pass.
2. Store your GitHub token
Configure the credential-to-tool binding in your bindings file so Bulwark knows to inject this token for GitHub tool calls.
3. Configure the upstream GitHub server
Edit bulwark.yaml:
Make sure GITHUB_TOKEN is set in your shell (export GITHUB_TOKEN=ghp_...).
4. Write a policy
5. Create a session and connect Claude Code
6. Use Claude Code — now governed
Start Claude Code. GitHub tools appear namespaced as github__list_issues, github__create_issue, etc.
Try it:
"List the open issues in my repo"
Open a second terminal:
Every call is logged with the verdict, matched rule, and timing. Now try something destructive:
"Delete issue #1"
Blocked. Sub-millisecond — policy evaluation happens in memory. The agent gets a structured error explaining which rule denied it.
What just happened
Claude Code connected to Bulwark (not directly to GitHub). For every tool call, Bulwark validated the session, scanned for secrets/PII, evaluated the policy, injected the real GitHub token, scanned the response, and recorded a tamper-evident audit event. Same agent experience — full governance underneath.
Going Deeper
Content inspection — 13 built-in patterns scan for AWS keys, GitHub tokens, private keys, PII, and prompt injection. Redaction happens before content reaches the agent.
Policy replay — Preview the impact of policy changes against real audit history before deploying:
Audit forensics — Reconstruct a session timeline and verify the hash chain:
HTTP proxy mode — For non-MCP agents, Bulwark runs as a forward proxy with TLS interception:
Architecture
Integration Modes
Example Policy
See examples/policies/ for complete policy sets (startup, enterprise, development, multi-agent).
CLI
Documentation
- Getting Started
- Architecture Overview
- Policy Reference
- Configuration Reference
- Credential Management
- Audit System
- Content Inspector
- Rate Limiting
- Threat Model
- Agent Guides: Claude Code | Codex | OpenClaw
Development
Project Structure
License
Apache 2.0. See LICENSE.
Source: README.md at commit 7563549
Tools
0Version history
1- v0.2.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts