Deploying autonomous coding agents like Claude Code into enterprise CI pipelines transforms static codebases into dynamic attack surfaces. Benni OS has released claude-code-eval, a new open-source tool designed to continuously red-team these agents within GitHub Actions. The tool specifically targets the PreToolUse hooks and MCP server boundaries that define the agent's execution limits, moving beyond simple regex blocklists to deterministic adversarial fuzzing.

The Illusion of Static Guardrails

Most teams assume that blocking commands like rm -rf / or cat .env via simple hooks seals the perimeter. In reality, un-fuzzed hooks fail against indirect prompt injection, where malicious instructions hidden in dependency READMEs or GitHub issues hijack the agent's next tool call. claude-code-eval challenges this assumption by treating untested guardrails as untested firewalls, synthesizing mutated payloads to probe for bypasses before a live incident occurs.

Four Adversarial Vector Families

The tool focuses on four primary threat vectors: indirect prompt injection, secret exfiltration, destructive shell chains, and SSRF probes. For exfiltration, it plants canary secrets (e.g., sk-ant-api03-CANARY...) and tests if the agent can bypass path canonicalization using symlinks or base64 encoding. It also tests SSRF vulnerabilities by firing probes at cloud metadata endpoints like 169.254.169.254 and IPv4-mapped IPv6 addresses, ensuring DNS/IP resolution is validated before any socket opens.

Deterministic Fuzzing Without Token Burn

A critical architectural feature of claude-eval redteam is its ability to run boundary regression tests without burning LLM API credits. The tool replays synthetic tool-call JSON payloads directly against the PreToolUse hook stdin in a deterministic dry-run mode. This allows for high-volume fuzzingβ€”up to 250 mutations per caseβ€”where each probe is evaluated in under 5 milliseconds, asserting that unsafe vectors are rejected with exit code 2 before any side effect can occur.

Key Takeaways

  • CI Integration: The tool runs directly in GitHub Actions, triggering on changes to .claude/settings.json, hook scripts, or MCP definitions.
  • Zero-Token Boundary Tests: Fuzzing PreToolUse hooks requires no LLM inference, making it cheap and fast for continuous integration.
  • Canary Traps: Synthetic secrets like ghp_CANARY... are planted in the CI workspace to detect exfiltration attempts via curl or base64.
  • SSRF Coverage: The suite tests against AWS/GCP IMDS endpoints, decimal-encoded IPs, and localhost admin sockets to prevent internal network probes.
  • Open Source: Available at Benni-OS/claude-code-eval on GitHub, with interactive benchmarks at benni-os.net.

The Bottom Line

System prompts are probabilistic guardrails, not security boundaries. If you are running Claude Code in a CI environment, you must treat your hook scripts as attack surfaces and fuzz them continuously, or risk letting a crafted README file exfiltrate your production secrets.