Marlowe
Audits Git diffs and staged changes for security findings before code is committed.
Integrates with GitHub pull requests and code scanning: runs diff audits, uploads SARIF v2.1.0, and posts a sticky PR verdict comment via a GitHub token.
Installs a Git pre-commit hook to run the security audit on staged changes before commit.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
AI coding agents mutate files, run shell commands, and open pull requests in seconds. Giving an agent an unguarded shell is a liability — and shallow static scanners drown teams in unreachable alerts.
Marlowe CI / Guard (v0.7.2) brings Marlowe's host-enforced security boundaries directly into Claude Code hooks, MCP clients (Claude Code, Cursor, VS Code, Codex CLI, Windsurf, Antigravity), GitHub Actions (SARIF v2.1.0), and git pre-commit hooks with zero runtime dependencies and no LLM key required.
What's New in v0.7.2
The release workflow waits for npm to serve the tagged package version before publishing the MCP Registry entry. If npm initially returns a 404, the workflow retries every 15 seconds for up to ten minutes. Release workflow change
What's New in v0.7.1
You can verify which GitHub Actions workflow and tagged source commit produced the npm tarball using the provenance on the npm package page.
What's New in v0.7.0
Semgrep replay checks whether a pull request drops coverage for a known, harmless fixture. The Action and CLI compare the same base-committed fixture and expected rule against both revisions. A lost match produces a high-severity finding in the PR summary and SARIF. Incomplete evidence produces CAN'T TELL. Configure Semgrep replay
What's New in v0.6.1
The GitHub Action scans each pushed commit. A secret added and removed in the same push fails the check, and the step summary and SARIF report identify the commit and line.
What's New in v0.6.0
10-Rule Shirudo Static & Offline Verifier (
SHIRUDO-BPF-001..004,SHIRUDO-BEE-001..003,SHIRUDO-TPM-001..003):.bpf.cupatches: Flags illegal sleepablefmod_ret.s/targets (BPF-001), missingreturn 0;or stripped-EAGAIN/<= -512/ positive returns (BPF-002),fmod_ret/wherelsm/avoids re-entrant fail-open gaps (BPF-003), and writes to read-onlyshirudo_task_policy/shirudo_sock_policymaps (BPF-004).Beefilemanifests &PreToolUse: Enforces selector cardinality, control-char escapes, and omitted CVE/enforcing selectors (BEE-001), blocks[[upatches.rodata]]shell/networkgenerator&updatehooks running with operator key privileges (BEE-002), and checkstree.idmatching, 64-bit one-hot policy bitmasks, path glob placement,load_target, and TOML subset validity (BEE-003).TPM 2.0 & Verifier Boundaries: Catches
shirudo statuswithout--check, self-asserted--ak-name=$(jq ...)/ missing--nonce, unpinned offlineev.json, zero PCR 11 QEMU boots, missing0x01818E00PCR 9 anchors, andreset_countmismatches (TPM-001..003).
ARTEX Defense & Behavioral Pack (
ARTEX-EDGE-001..003,ARTEX-BEHAV-001):Pre-merge Edge & Identity Rules: Flags unauthenticated Swagger/OpenAPI/GraphQL introspection and public
.js.map/ production sourcemaps (EDGE-001), OAuthstate: false/ open redirects / credentialed wildcard CORS / weak reset tokens (EDGE-002), andskipAuthor unauthenticated/admin//backup//webhookroutes (EDGE-003).Behavioral Agentic Log Detector (
analyzeLogs): Detects machine-speed HTTP recon → OAuth/auth pivots,400/422payload adaptation bursts, and low-static-ratio enumeration even behind rotated IPs and browser User-Agents (ARTEX-BEHAV-001, MITRET1595).
Expanded 40-Scenario Benchmark Suite (
npm run bench) & 18-Repo + 225-PR + Real-CVE OSS Corpus (npm run bench:corpus): Lifted Shirudo3/3→12/12, added7/7ARTEX Edge Defense (40/40100%accuracy,0%clean FP0/10,24.1msp50), and benchmarked across 6 blind held-out OSS repos (90real PRs:0/90falseFAILS,12.42msp50) + 9 calibration repos (135real PRs:0/135falseFAILS), 3 code-only OWASP targets (86failing issues, HTML tutorial prose excluded), and 4 real historical CVE fix commits. Marlowe CI is a fast, zero-dependency AI-agent & pre-merge guardrail (pairable with--scanners autoforsemgrep/gitleaks/trivy), not a full-AST taint analyzer.SARIF First-Class
ruleIds + Maintainer Docs: Preserves explicitSHIRUDO-*andARTEX-*rule IDs in SARIF v2.1.0 output and addsCLAUDE.md.
Three Answers, Never Two
Every audit emits one explicit verdict:
Verdict | Meaning | Exit Code |
| Diff/workspace checked; no exposed secrets, reachable sinks, CVEs, or unverified guard gaps. |
|
| Confirmed hardcoded secret, reachable CWE sink, TLS bypass, or vulnerable dependency ≥ |
|
| Unknown is never rounded to a pass — triggers on unverified local sinks without external ingress, security/auth files edited without tests, scanner suppression directives ( |
|
Related MCP server: local-mcp-toolbox
Recorded Benchmark Scorecard (npm run bench)
Executed offline via benchmarks/run-benchmarks.cjs against 40 ephemeral Git diff repositories (Node.js v26.12.0, darwin-arm64, 0 skipped; saved in benchmarks/results.json):
Exact 3-State Verdict Accuracy:
40/40(100%)FAILSPrecision / Recall / F1:100% / 100% / 100%(FP = 0,FN = 0)Clean / Benign False-Positive Rate:
0%(0/10)CAN'T TELLExact Match:9/9Latency (
p50/p95/mean):24.1ms/26.31ms/24.56ms
Domain | Passed | Accuracy | p50 | p95 |
AppSec & Cross-File Reachability |
|
|
|
|
Secrets & Masking |
|
|
|
|
Guardrail Regressions & Precision |
|
|
|
|
Agent Guard (Prompt Injection / Trojan / Rug-Pull) |
|
|
|
|
Shirudo eBPF, Beefile & TPM Attestation |
|
|
|
|
ARTEX Edge Defense (Maps / OAuth / CORS / Admin) |
|
|
|
|
Binaries & Clean Refactors |
|
|
|
|
Real-World 18-Repo OSS Corpus, 225-PR Replay & Real CVE Check (npm run bench:corpus)
Separated cleanly into Calibration (9 repos · 135 PRs), Blind Held-Out (6 unseen repos · 90 PRs, raw/untuned), Code-Only OWASP Targets (HTML prose excluded), and 4 Verified Historical CVE Fix Replays (benchmarks/corpus-results.json):
Cohort · Repository (Pinned SHA) | Ecosystem | PR Diff Replay ( | Full-Repo Failing | Full Verdict / Notes |
Blind · | JS |
|
|
|
Blind · | TS |
|
|
|
Blind · | Python |
|
|
|
Blind · | Python |
|
|
|
Blind · | Go |
|
|
|
Blind · | Rust |
|
|
|
Cal · | JS |
|
|
|
Cal · | JS |
|
|
|
Cal · | TS |
|
|
|
Cal · | JS |
|
|
|
Cal · | TS |
|
|
|
Cal · | Python |
|
|
|
Cal · | Python |
|
|
|
Cal · | Go |
|
|
|
Cal · | eBPF / C / Rust |
|
|
|
Vuln · | Node.js | — |
|
|
Vuln · | Node.js / TS | — |
|
|
Vuln · | Python / Django | — |
|
|
Honest Real-CVE Replay (
1 / 4pre-patch,0 / 4in line-diff alone): Replaying verified pre-patch states forCVE-2021-21315(sebhildebrandt/systeminformation),CVE-2022-25912(steveukx/git-js),CVE-2021-23337(lodash/lodash), andCVE-2020-14343(yaml/pyyaml) returnedCAN'T TELL(27unverified sink items at file level) forCVE-2021-21315andHOLDS UPon the other three. Sanitizer/argument/class-hierarchy bypasses require AST dataflow analysis (--scanners autowithsemgrep), reinforcing Marlowe CI's role as a fast pre-merge & agentic guardrail layer rather than a standalone AST SAST replacement.
Recorded Live Localhost Purple-Team Run (npm run bench:artex)
Executed against a sealed 127.0.0.1 Node HTTP target server (662.48ms total, benchmarks/run-artex-purple-team.cjs → benchmarks/artex-purple-team-results.json; note this uses a controlled local Planner→Worker HTTP attacker with rotated X-Forwarded-For IPs & standard Chrome User-Agent, not an external third-party binary):
Phase | Pre-Merge Gate | Live Compromises | DFIR | Classic |
A. Before Hardening |
|
| Detected ( |
|
B. After Hardening |
|
| Detected ( |
|
C. Benign Human Browser ( | — | — | Clean ( |
|
An additional
10-request rapid200 OKSPA API burst (0static assets,0alerts) is pinned intest/artex-defense.test.cjs. See all charts interactively atzerotheorylabs.com/benchmarks.
Quickstart
1. Claude Code Hooks + MCP (One Command)
Install PreToolUse, PostToolUse, and Stop hooks into .claude/settings.json plus the read-only stdio MCP server into .mcp.json:
npx --yes @zerotheory-labs/marlowe-ci init --claude --mcpWhat gets enforced automatically inside Claude Code:
PreToolUse(Read|Edit|Write|MultiEdit|WebFetch|Bash):Blocks reading/writing sensitive credential paths (
.env*excluding.env.example/.sample/.template,.ssh,.aws,.gnupg,.shirudo,shirudo-keys,.npmrc,.netrc,*.pem,*.key) and symlink escapes outside the workspace.Enforces SSRF guards on
WebFetchandBash(169.254.169.254,metadata.google.internal, private RFC1918/loopback targets unless explicitly listed in.marlowe-scope.json).Blocks
curl | sh, Node TLS verification bypass overrides, catastrophicrm -rf, and credential exfiltration pipelines; prompts (ask) ongit push --force,git reset --hard,chmod 777,sudo,wrangler deploy, and live Shirudo (shirudo upatch load|unload|reconcile,shirudo bpm build|push|tree append,shirudo genkey|keys|init|image).
PostToolUse(Edit|Write|MultiEdit):Scans modified files in milliseconds for secrets (masked before model feedback), CWE sinks, high-entropy blobs, suppression directives, and Shirudo
Beefile/*.bpf.cissues so Claude fixes vulnerabilities on the next turn.
Stop:Runs a diff-scoped verdict check before Claude ends its turn and blocks completion on
FAILS(honoringstop_hook_active: trueto prevent loops).
2. Universal MCP Server (Cursor, VS Code, Codex, Windsurf, Antigravity)
Configure supported editors & coding agents in one command (preserves existing entries):
# Install across Cursor, VS Code, Codex CLI, Windsurf, Claude Code & .mcp.json:
npx --yes @zerotheory-labs/marlowe-ci init --all-agents
# Or target a single client:
npx --yes @zerotheory-labs/marlowe-ci init --cursor
npx --yes @zerotheory-labs/marlowe-ci init --vscode
npx --yes @zerotheory-labs/marlowe-ci init --codex
npx --yes @zerotheory-labs/marlowe-ci init --windsurfOr wire stdio manually (listed on the official MCP Registry as io.github.zerotheory-labs/marlowe-ci):
{
"mcpServers": {
"marlowe": {
"command": "npx",
"args": ["--yes", "@zerotheory-labs/marlowe-ci", "mcp"]
}
}
}Exposed read-only tools (13 total across AppSec, Authorized Recon, DFIR & Shirudo):
AppSec & Supply Chain:
marlowe_scan_diff,marlowe_scan_workspace,marlowe_audit_dependencies,marlowe_doctorAuthorized Recon (ScopeGate-enforced):
marlowe_check_scope,marlowe_inspect_http,marlowe_inspect_tls,marlowe_dns_reconDFIR (
O_NOFOLLOW-confined):marlowe_triage_artifact,marlowe_analyze_logs,marlowe_extract_iocsShirudo Runtime Upatch & TPM 2.0 Attestation:
marlowe_shirudo_audit,marlowe_shirudo_verify_attestation
3. GitHub Actions (SARIF + PR Verdict Comment)
In diff mode, pull requests use their merge base. On a push, Marlowe checks each newly reachable commit against its first parent, including commits on merged branches. A secret added and then removed in the same push fails the check. The step summary and SARIF report identify the commit and line.
For a new ref, Marlowe checks the commits listed in the event and the final tracked tree. If the event lacks a complete commit list, it walks the new ref's history. A force push also checks what changed between the old and new tips. Deleting a ref skips the check. Use fetch-depth: 0 so Git can read the push history.
Add .github/workflows/marlowe-ci.yml (or run npx --yes @zerotheory-labs/marlowe-ci init --github):
name: Marlowe CI Security Guard
on:
pull_request:
permissions:
contents: read
security-events: write
pull-requests: write
jobs:
marlowe:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: zerotheory-labs/marlowe-ci@v0.7.2
id: marlowe
with:
mode: diff
fail-on: high
sarif-file: marlowe.sarif
comment-pr: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: github/codeql-action/upload-sarif@v4
if: always() && steps.marlowe.outputs.sarif-file != ''
with:
sarif_file: marlowe.sarifReplay Semgrep coverage on pull requests
Set the Action input semgrep-replay: .marlowe/replay.json and install the Semgrep CLI on the runner. Use fetch-depth: 0 so Git can read both commits named in the pull request event.
Commit the manifest and a harmless fixture to the base branch. For example, a team with a no-console-log rule in .semgrep/rules.yml can put console.log("Marlowe replay"); in .marlowe/fixtures/console.js and use this manifest in .marlowe/replay.json.
{
"config": ".semgrep/rules.yml",
"rule": "no-console-log",
"fixture": ".marlowe/fixtures/console.js",
"target": "services/payments/marlowe-replay.js"
}Marlowe places the same fixture bytes at target in two temporary Git repositories. Each uses its revision’s checked-in Semgrep YAML or JSON configuration and the ignore files governing that path. The target directory must exist in both revisions. The replay uses local Semgrep rules. Hosted policies and flags set by a separate workflow are outside its scope.
The PR summary shows both commit SHAs, the rule, the fixture path, and each scan’s outcome. A base match that disappears on the PR produces a high-severity MARLOWE-SEMGREP-REPLAY finding in the verdict and SARIF. An unavailable scanner, invalid configuration, or missing base match produces CAN'T TELL. Set fail-on-cant-tell: 'true' to require complete evidence before merging.
To replay locally against the committed HEAD, run marlowe-ci scan --base origin/main --semgrep-replay .marlowe/replay.json.
Live PR Verdict Example
Real sticky comment posted automatically on zerotheory-labs/marlowe#1:
🟡 Marlowe CI Verdict: CAN'T TELL
Evidence is incomplete or contains unverified sinks — never rounded to a pass.
Mode:
diff· Files inspected:2· Threshold:high· Duration:18msNo security findings detected.
Can't Tell Items (1)
sensitive-surface-untested— Security-sensitive surface modified without any test changes (.github/workflows/marlowe-ci.yml).
4. Local Diff, Recon, DFIR & Baseline CLI
# Audit working tree & untracked files
npx --yes @zerotheory-labs/marlowe-ci scan
# Audit staged changes offline before commit
npx --yes @zerotheory-labs/marlowe-ci scan --staged --no-osv
# Acknowledge non-secret legacy findings (secrets are never baselined)
npx --yes @zerotheory-labs/marlowe-ci baseline --no-osv
# ScopeGate-enforced Recon & O_NOFOLLOW DFIR
npx --yes @zerotheory-labs/marlowe-ci recon http https://staging.example.com
npx --yes @zerotheory-labs/marlowe-ci dfir logs ./access.log
npx --yes @zerotheory-labs/marlowe-ci dfir iocs ./incident.txt
# Shirudo Beefile / Plain BPF C audit & TPM 2.0 quote verification
npx --yes @zerotheory-labs/marlowe-ci shirudo audit ./shields
npx --yes @zerotheory-labs/marlowe-ci shirudo attest ./evidence.json --nonce deadbeef
npx --yes @zerotheory-labs/marlowe-ci shirudo status
# Install .git/hooks/pre-commit & inspect 10 local security CLIs
npx --yes @zerotheory-labs/marlowe-ci init --git-hook
npx --yes @zerotheory-labs/marlowe-ci doctorOptional Scope Configuration (.marlowe-scope.json)
{
"targets": ["https://staging.example.com", "127.0.0.1:3000"],
"allowOsv": true,
"redactContext": true
}Security & License
Security policy & trust boundaries:
SECURITY.mdLicense: PolyForm Noncommercial License 1.0.0 — Copyright © Zero Theory Labs. Free for personal, academic, educational, non-profit, and non-commercial security research. Commercial or internal business CI/CD use requires a commercial license (
access@zerotheorylabs.com).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
12 read-only MCP tools for AI communication rules, instruction linting & 25-model benchmarks.
Audit, pin and diff agent tool lists; preflight and watch remote MCP servers. Free tier; x402.
Read-only verifier for 25 ProofRelay MCP tools and non-confidential evidence bundles.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceProvides access to 13+ penetration testing and security audit tools through a unified MCP interface. Enables security professionals to perform vulnerability scanning, web fuzzing, network reconnaissance, and other security assessments through containerized tools like Nuclei, Nmap, SQLMap, and FFUF.MIT
- AlicenseAqualityBmaintenanceA secure, local-first MCP server for read-only inspection and troubleshooting of development environments, exposing narrow, typed, auditable capabilities for repository inspection, log summarization, Docker review, and security scanning without granting unrestricted machine access.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables authorized security auditing of AI-agent supply chains and agent-facing surfaces: deterministic local skill-bundle audits against eight attack patterns, secrets scanning, and scope-gated read-only recon of agent endpoints and MCP surfaces.MIT
- AlicenseNot gradedqualityDmaintenanceEnables enterprise MCP security auditing through 12 deterministic no-LLM tools for evidence-gated claims, skill/prompt supply-chain audits, token profiling, and server auth-mode checks.MIT