By  Jake Luna / 8 Aug 2026 / Topics: Artificial Intelligence (AI) , Managed security

In this post, we examine secure hooks — an essential AI guardrail for hardening agent code harnesses against unauthorized actions and establishing robust control across your organization.
AI adoption has introduced many new buzzwords (like prompt engineering and vibe coding), but the one that deserves serious attention is prompt injection. It continues to make headlines due to the significant attack vector it presents and has given rise to a new class of attack known as promptware.
After extensive internal experimentation and consideration of industry concerns, we have developed a deterministic guardrail strategy. By deterministic, we mean a control in which the output is fixed by its input — the same tool call always yields the same decision 100% of the time — unlike the probabilistic model the guardrail governs, which can be coaxed into behaving differently.
We believe this approach can help mitigate promptware, enabling organizations to implement AI in a secure and repeatable manner.
We are starting to understand how AI-related attacks are forming within enterprises.
To name some examples:
AI used in an offensive capacity is here to stay.
Claude Code · Cursor
Copilot
evaluated in the
tool-use loop
→ action runs
→ a human confirms first
→ blocked, with a reason
Just as Kubernetes standardized admission control through Open Policy Agent (OPA) and Gatekeeper, secure hooks bring that same primitive to the tool-use loop. Acting as a checkpoint on every tool call — whether the model attempts to run a command, touch a file, or push code — a policy inspects the action first and issues a verdict: ALLOW, ASK, or DENY. If blocked or flagged, a human-readable reason is returned so the model can self-correct.
For decades, security and software engineering have relied on a core set of fundamental principles: least privilege, defense in depth, auditability, and version-controlled policy. All of them apply directly to the environments where AI agents now operate. In fact, these are the exact controls prescribed across major security frameworks — from least-privilege tool access and per-action audits to egress allowlists, action-confirmation gates, and output handling. You see them across the industry’s primary guidance:
What’s been missing is a standard place to enforce these controls and prove compliance. We believe the tool-use loop is that place.
Most of the security stack you already own operates before or after the agent acts, but not where it acts:
There is one control that already sits in the loop: confirmation prompts. Claude Code and other AI harnesses pause to ask a human before invoking a tool. However, for enterprises using agents in prolonged, asynchronous workflows, this control process can become tedious. These interactions push engineers to seek the path of least resistance, ultimately leading them to click the “Always allow” button.
The actual gap isn’t a complete lack of control. Rather, it’s the absence of a standardized, policy-as-code approach: deterministic guardrails written and versioned like software, then applied uniformly across every agent.
Kubernetes faced this exact challenge. A fragmented world of ad hoc policies converged on admission control — a single checkpoint evaluating every change before execution to allow, deny, or flag it for review. OPA and Gatekeeper turned that checkpoint into an industry standard.
To secure AI agents, the guardrail must operate independently, specifically situated at the tool-use loop. Instead of relying on system prompts, which are ineffective since the model itself is what is being manipulated, decisions must be enforced externally. When the model attempts to execute commands, modify files, or push code, an independent policy must evaluate the action first and issue a verdict outside of the model’s control.
Oleg Brodt, Elad Feldman, Bruce Schneier, and Ben Nassi mapped seven stages of the “Promptware Kill Chain” onto an agentic AI system. What makes this attack model new isn’t any single stage. It’s that the malware never has to break out: It runs inside your agent’s authorized permissions, invoking the tools you already gave it.
| Stage | What it looks like with an agent | Framework anchor |
|---|---|---|
| Initial access | Prompt injection, typed directly or smuggled into a web page, email, PDF, or calendar invite the agent reads | OWASP LLM01:2025 · MITRE ATLAS AML.T0051 |
| Privilege escalation | Jailbreak past alignment — persona shifts and multi-turn crescendo | NIST AI 100-2 · jailbreak |
| Reconnaissance | The order inverts: recon happens after compromise. The attacker asks the model about its own tools, permissions, and reach | OWASP LLM07 · System Prompt Leakage |
| Persistence | Instructions poisoned into long-term memory or a retrieval store, re-firing later on a benign trigger | OWASP LLM08 · Agentic 2026 (memory) |
| Command & control | Exfiltration and callbacks via attacker-controlled URLs | OWASP Agentic 2026 |
| Lateral movement | Agent-to-agent spread; the Morris II self-replicating prompt worm | OWASP Agentic 2026 |
| Actions on objective | Data exfiltration, financial fraud, physical impact via connected devices, or Remote Code Execution (RCE) when the agent has a terminal | OWASP LLM05 / LLM02 |
In “Invitation Is All You Need,” security researchers used an indirect prompt injection method to poison a Google Calendar invite to hijack a Gemini instance. One meeting-description prompt made the victim’s assistant control smart-home devices, force a video call, and exfiltrate data. The victim’s only action was to ask their assistant about their calendar.
Think of AI agents as very eager but sometimes gullible interns who can be tricked into taking risky actions. Instead of trying to monitor every single instruction they receive (the system prompt), we focus on the moment they are about to execute an action (the tool-use loop). Our secure hooks act like a circuit breaker in your electrical system: Even if the agent is tricked into attempting a dangerous command, the circuit breaker trips instantly, cutting the action before any damage occurs.
Adding deterministic controls around tooling does not make the tool immune to attacks, and determined attackers will most certainly probe and attempt to bypass them. However, our approach ensures all tool calls and policy violations are logged and reviewable. This enables us to see which autonomous jobs are performing and pattern-match in real time. A logged, enforceable control within the loop now grants us visibility we didn’t have before.
It took security practitioners years to catch up with the last industry shift to Kubernetes. This shift is faster. The teams that put a control in the agent loop can show what they caught and will be able to preemptively take action before the incident rather than react to it after the fact.