How one blocked leak changes the next decision
An inbox assistant reads external text, attempts to expose a credential, and then proposes an ordinary search. GuardLLM remembers the blocked exfiltration and tightens the later call.
Session statecontamination not runescalation not run
1. The job
The assistant reads email, drafts replies, and can search internal scheduling data.
External email is an application input, not trusted operator intent.
2. The attack surface
Anyone who can send email can place text in this assistant's working context. The inbox is an input to the application.
External text can influence model behavior without becoming trusted operator intent.
3. What the demo application sends
The host preserves the email's message envelope and GuardLLM adds <untrusted_content> framing inside it. Framing helps the model interpret origin; it does not authorize actions.
4. The unprotected run
Without an egress check, the host would send a model draft containing the private configuration. The demo does not claim a live model execution; it exposes the missing enforcement point.
Unchecked draft reaches the sink with displayed credential sk-abc...1234
5. The protected run: ingest
STATE RECORDEDThe host labels the email at ingress. The detector produced no warning on this exact text, and the session is marked contaminated regardless, because contamination follows the declared origin.
Detector warning=false
6. The protected run: egress blocks the credential
BLOCKEDThe complete synthetic credential is checked on the way out, and the block is recorded against the session.
Secret pattern detected: OpenAI API key, High-entropy token (4.9 bits)
7. The next tool call, same session
BLOCKEDThe assistant proposes an ordinary non-destructive search. The session now carries the recorded block.
Authorization required: egress escalated=require_auth
8. The same call in a fresh session
ALLOWEDOne control: the identical proposal against a session that never blocked anything.
Non-destructive tool, implicit allow
9. Generalize
The email path is one route through the four boundaries. The complete reference adds web, documents, RAG, MCP, both outbound lanes, and the two state rails.
View the full system map to locate every direct-entry card.
10. Why detection is not the whole design
This exact email produced no detector warning. GuardLLM still records origin, inspects egress, and feeds high-confidence enforcement outcomes into later policy.
Detection is one signal. Provenance, canaries, DLP, authorization, integrity, and session state enforce independent invariants.
Evidence, scope, and reproduction
Adversary A1Ingress → Egress → AuthorizationT-IN1A-AS1 · A-AS9Source:
SecurityPipeline.check_outboundTest: tests/test_demo_scenarios.pyExact fixture test: tests/test_demo_scenarios.py::test_primary_escalation_fixture
.venv/bin/python -m pytest tests/test_demo_scenarios.py::test_primary_escalation_fixture -q
Generated fixture