A system that executes AI-generated exploit code must be hardened against every attack vector — especially itself.
Prompt Injection DefenseCritical
▶Document blocks — untrusted code diff isolated from instructions structurally
▶Append-only audit log → SOC 2 evidence trail
▶Signed tool definitions — prevents tool poisoning via repo
▶Input sanitisation — all LLM inputs scrubbed before prompt injection
Sandbox IsolationHigh Risk
▶Docker container (dev) — 30s timeout, 256MB cap, no network
▶cap_drop ALL + pids_limit 50 + non-root user
▶Exploit-only: stdlib + requests — pre-validated before sandbox
⚠Firecracker microVMs (prod) — hardware-level isolation (WIP)
Patch ValidationMulti-Layer
▶Semgrep security-audit on every patch diff before merge
▶OSV scanner on all new dependencies introduced by patch
▶50-line surface area cap — larger patches require human approval
⚠Semantic equivalence — differential fuzzing on 10K inputs (WIP)
MCP HardeningProtocol-Level
▶Mutual TLS + DPoP tokens (300s TTL) — all gateway traffic
▶Per-agent RBAC — Engineer cannot merge; only writes PR drafts
▶OpenTelemetry traces on 100% of tool calls — anomaly alerting
▶HashiCorp Vault dynamic secrets — 24-hour TTL API key rotation