Nous.Plugins.DecisionGuard.Pack for the tool-result surface
(:post_tool_use): indirect prompt injection in what a tool returned.
Self-injection exposure is highest here: the classifier reads raw attacker
text. The special-token defang in Nous.DecisionModel.decide/4 always
applies; the optional canary is weak extra evidence.
Provisional bands
These bands come from an 8-item probe per surface on Clef-Flash (4 benign, 4 malicious), not a benchmark. Re-tune them on your own traffic before relying on them.
Questions (all :noul, true = risky)
| id | band (allow below / deny at) |
|---|---|
embedded_instructions | 0.25 / 0.75 |
goal_hijack | 0.30 / 0.75 |
data_exfiltration_request | 0.20 / 0.70 |
impersonation | 0.25 / 0.85 |
hidden_content | 0.35 / 0.95 |
embedded_instructions counts imperative text written for human readers
(recipes, install steps, code comments) as ordinary data, so READMEs and
how-tos do not trip it.
A deny (or an unapproved escalation) withholds the result: the model sees
"[tool result withheld by decision hook]" instead, and no later
:post_tool_use hook can put the original back.
State
%{"arguments" => "<the call's arguments as JSON, at most 1,000 chars>",
"surface" => "tool_result", "task" => "...",
"tool" => %{"category" => ..., "description" => ..., "name" => ...},
"untrusted_content" => "<the result as text>"}