Prompt Guardrails (Lakera, NeMo, Llama Guard) vs. Cryptographic Intent Enforcement
Why probabilistic prompt-injection classifiers cannot replace deterministic pre-action authorization when an AI agent touches supplier bank accounts or payouts.
Key Takeaways
- Prompt classifiers reduce jailbreaks and toxicity, but any probabilistic model has a non-zero false-negative rate against novel indirect prompt injections.
- Financial internal controls require deterministic rules: an invoice over €10,000 must pause for human approval 100% of the time, regardless of prompt wording.
- Combining upstream prompt hygiene with a downstream non-bypassable enforcement gateway provides defense in depth.
1. Business & threat context
Security teams often start their AI governance journey by deploying LLM input/output firewalls such as Lakera Guard, NVIDIA NeMo Guardrails, or Llama Guard. These tools inspect natural language for jailbreak patterns, PII leakage, and toxic content.
The category error happens when prompt filters are treated as financial authorization. If a malicious PDF invoice embeds an indirect prompt injection that slips past a classifier with a 99.2% detection rate, and the agent runtime holds direct ERP credentials, the fraudulent IBAN update executes silently.
Probabilistic filters != financial authority
Use prompt guardrails to filter noisy inputs, but never grant an LLM runtime direct write credentials to money-moving APIs.
2. How ActEscrow solves it (Service 01)
ActEscrow operates on structured, canonicalized tool intents—not natural language prompts. Even if an LLM is completely compromised by prompt injection, it holds zero ERP credentials and cannot bypass the gateway's deterministic policy rules, daily quotas, or two-person human approval lock.
{
"ruleId": "invoice-high-value-maker-checker",
"tool": "erp.invoice.approve",
"condition": { "field": "amountMinor", "op": "Gt", "value": 100000 },
"decision": "RequireApproval",
"requiredApprovals": 1
}3. Production implementation checklist
When evaluating Lakera Guard / NeMo Guardrails / Llama Guard alongside a customer-owned enforcement boundary, engineering and finance leaders should verify the following operational controls:
- Treat all LLM output and tool-call arguments as untrusted input
- Enforce deterministic numeric and resource bounds outside the agent process
- Bind human approvals to the SHA-256 digest of the canonicalized tool payload
Reading the example rule carefully
Two clarifications on the material above. The 99.2% detection figure is illustrative, not a measured rate for any named product; the point holds for any classifier with a non-zero miss rate. And the example rule uses amountMinor greater than 100000, which in EUR is €1,000.00, not €10,000. Thresholds in minor units are easy to misread by a factor of ten or a hundred, which is why reviewers should see both forms.
The rule also has no currency condition. A production rule should pair the amount with an explicit currency check, otherwise 100000 minor units of a currency with a different exponent means a different amount entirely.
{
"ruleId": "invoice-over-1000-eur-needs-approval",
"tool": "erp.invoice.approve",
"conditions": [
{ "field": "currency", "op": "Eq", "value": "EUR" },
{ "field": "amountMinor", "op": "Gt", "value": 100000 }
],
"decision": "RequireApproval",
"requiredApprovals": 1
}An injection walkthrough with both layers in place
Consider a hypothetical PDF invoice containing hidden text that tells the agent to update the supplier's IBAN. A prompt classifier may flag it, in which case the agent never asks. If it misses, the agent submits erp.supplier.bank_account.change. The gateway does not read the prompt at all: it sees a structured intent, matches a rule that requires two approvals, and parks the action.
Approvers now see a diff from the current IBAN to the new one, bound to a digest. Whether they catch the fraud depends on their call-back procedure, not on the model. The agent still has no ERP credential, so there is no path around them.
Layering without overlap
Let the classifier reduce noise and obvious attacks; let the gateway decide authority. Neither should be configured as if the other did not exist.
What to measure in a pilot
Measure the two layers separately. For the classifier, track flagged inputs and known misses from red-team samples. For the gateway, track how many actions were denied or sent to approval, how many approvals were rejected, and whether any write reached the ERP outside the gateway. The last number should be zero by construction.
Security scope and deployment prerequisites
This is a pilot implementation, not a zero-risk guarantee or compliance certification. Examples describe repository capabilities or deployment recommendations, not proof that a live installation has enabled them.
Every enrolled write fails closed during control-plane outages. Privileged control-plane MFA is mandatory outside Development, but accepted MFA claims do not prove recent authentication or hardware-backed WebAuthn unless the identity provider enforces those properties.
Per-agent deactivation blocks new evaluations and redeems and cancels Pending/Approved actions; it cannot recall an already executing ERP write. Evidence verifies recorded events, not unrecorded ERP activity; independently retained heads and trusted keys are needed to detect truncation or replacement.
Production blockers remain
The static portal still uses sessionStorage tokens (BFF not implemented). Off-host backup signing, immutable backup storage, live IdP MFA/logout testing, restore drills, adapter validation, monitoring, and legal review require deployment-specific work. Anchoring and SIEM forwarding are optional and must be configured and tested. See the repository deployment guide and runbook gap register before using real customer data.
Related deep dives
GRC Automation (Vanta, Drata) vs. Cryptographic Decision Evidence Vaults
Nov 20, 2026 · 3 min readArchitectureiPaaS Connectors (Workato, Zapier, Make) vs. Fail-Closed Agent Gateways
Nov 19, 2026 · 3 min readEngineeringStandalone Policy Engines (OPA, Cedar, Cerbos) vs. Full-Lifecycle Action Assurance
Nov 18, 2026 · 3 min read