What It Is
The Forge Crucible is a 9-layer security pipeline that processes every model input and output. Each layer operates independently — compromising one doesn't disable the others. The layers cover prompt injection detection, output scanning, threat signatures, canary tokens, provenance tracking, and more.
The 9 Layers
- Pattern Scanner — 88 regex patterns detect prompt injection, data exfiltration, encoded payloads, zero-width chars, and secret leaks in files and AI output
- Semantic Anomaly Detector — embedding-based content analysis flags chunks that are semantically inconsistent with surrounding code (catches novel injection attacks that evade pattern matching)
- Behavioral Tripwire — monitors tool-call sequences in real-time; detects read-then-exfiltrate and read-then-sensitive-write patterns within a 30-second window
- Canary Trap — UUID honeypot token injected into system prompt; if the AI outputs it in any tool call, prompt injection is confirmed as CRITICAL
- Threat Intelligence — updatable signature database with SHA-512 envelope validation, version monotonicity (downgrades rejected), and ReDoS guards on every pattern
- Command Guard — 40+ shell blocklist patterns block RCE, LOLBins, privilege escalation, and destructive filesystem operations before execution
- Path Sandbox — filesystem restriction with symlink-aware validation; resolves paths before checking to prevent redirect attacks
- Plan Verifier — test/lint/typecheck gates between multi-step plan execution; strict mode rolls back the step on verification failure
- Forensic Auditor — complete session audit trail logging every file read, write, edit, shell command, tool call, threat detection, and context operation with timestamps and severity classification
Why 9 Layers
Defense in depth. A prompt injection that bypasses input sanitization still hits output scanning. A tool call that evades validation still gets caught by path traversal guards. Every layer is an independent checkpoint. Attackers don't need to find one exploit — they need to chain 9.
Compliance Mapping
The Crucible maps directly to established compliance frameworks: