Skip to main content
Glama

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.4.0) brings Marlowe's host-enforced security boundaries directly into Claude Code hooks, MCP clients (Claude Code, Cursor, 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.4.0

  • Cross-File Taint Reachability (2-Hop): Traces imported helper sinks (./ and ../ ESM/CJS/Python callers up to 2 hops) back to HTTP/DOM/CLI ingress while keeping unimported sibling helpers isolated.

  • MCP Registry Manifest & npm Package Readiness: Ships server.json (io.github.zerotheory-labs/marlowe-ci) and slimmed package.json files / prepublishOnly packaging for @zerotheory-labs/marlowe-ci.

  • Repeatable Linux Shirudo Harness: scripts/verify-linux-shirudo.sh exercises doctor, shirudo status, static Beefile / *.bpf.c audits, and TPM checks on Linux hosts.


Three Answers, Never Two

Every audit emits one explicit verdict:

Verdict

Meaning

Exit Code

HOLDS UP

Diff/workspace checked; no exposed secrets, reachable sinks, CVEs, or unverified guard gaps.

0

FAILS

Confirmed hardcoded secret, reachable CWE sink, TLS bypass, or vulnerable dependency $\ge$ --fail-on.

1

CAN'T TELL

Unknown is never rounded to a pass โ€” triggers on unverified local sinks without external ingress, security/auth files edited without tests, scanner suppression directives (nosemgrep, gitleaks:allow), high-entropy binaries, or unavailable OSV/CLI checks.

0 (2 with --fail-on-cant-tell)


Related MCP server: local-mcp-toolbox

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 github:zerotheory-labs/marlowe-ci init --claude --mcp

What 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 WebFetch and Bash (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, catastrophic rm -rf, and credential exfiltration pipelines; prompts (ask) on git 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.c issues 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 (honoring stop_hook_active: true to prevent loops).


2. Universal MCP Server (Cursor, Codex, Windsurf, Antigravity)

Start over stdio (newline-delimited JSON-RPC 2.0):

{
  "mcpServers": {
    "marlowe": {
      "command": "npx",
      "args": ["--yes", "github: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_doctor

  • Authorized Recon (ScopeGate-enforced): marlowe_check_scope, marlowe_inspect_http, marlowe_inspect_tls, marlowe_dns_recon

  • DFIR (O_NOFOLLOW-confined): marlowe_triage_artifact, marlowe_analyze_logs, marlowe_extract_iocs

  • Shirudo Runtime Upatch & TPM 2.0 Attestation: marlowe_shirudo_audit, marlowe_shirudo_verify_attestation


3. GitHub Actions (SARIF + PR Verdict Comment)

Add .github/workflows/marlowe-ci.yml (or run npx --yes github: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.4.0
        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() && hashFiles('marlowe.sarif') != ''
        with:
          sarif_file: marlowe.sarif

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: 18ms

No 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 github:zerotheory-labs/marlowe-ci scan

# Audit staged changes offline before commit
npx --yes github:zerotheory-labs/marlowe-ci scan --staged --no-osv

# Acknowledge non-secret legacy findings (secrets are never baselined)
npx --yes github:zerotheory-labs/marlowe-ci baseline --no-osv

# ScopeGate-enforced Recon & O_NOFOLLOW DFIR
npx --yes github:zerotheory-labs/marlowe-ci recon http https://staging.example.com
npx --yes github:zerotheory-labs/marlowe-ci dfir logs ./access.log
npx --yes github:zerotheory-labs/marlowe-ci dfir iocs ./incident.txt

# Shirudo Beefile / Plain BPF C audit & TPM 2.0 quote verification
npx --yes github:zerotheory-labs/marlowe-ci shirudo audit ./shields
npx --yes github:zerotheory-labs/marlowe-ci shirudo attest ./evidence.json --nonce deadbeef
npx --yes github:zerotheory-labs/marlowe-ci shirudo status

# Install .git/hooks/pre-commit & inspect 10 local security CLIs
npx --yes github:zerotheory-labs/marlowe-ci init --git-hook
npx --yes github:zerotheory-labs/marlowe-ci doctor

Optional 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.md

  • License: 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โ€ฆ

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides 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
    • A
      license
      A
      quality
      B
      maintenance
      A 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.
      8
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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