Runtime AI security is the set of controls that checks an AI agent's actions while it is running, before those actions reach business systems. It matters because a model can be influenced by hostile content, even when you give it careful instructions. The design goal is simple: let the model suggest an action, but let deterministic controls decide whether that action is allowed to run. If you are planning an agent deployment, start with PADISO's AI agents and automation service, which focuses on taking agents from a promising pilot to controlled production.
OpenAI and Cisco's Shirudo project offers a useful example of this principle, but with an important distinction: Shirudo protects Linux systems by validating and controlling AI-generated runtime patches. It is not a prompt-injection filter or a general tool-call security product. Its value for agent designers is architectural: generated actions should pass through verifiable controls before they reach a sensitive endpoint.
What does runtime AI security mean?
Runtime AI security means enforcing security rules at the moment an AI system acts. The term runtime refers to the period when software is executing, not when a team is planning or training it. A runtime control can inspect an agent's proposed tool call, reject an unsafe parameter, require approval, or isolate the work in a restricted environment.
An agent is an AI application that can choose and call tools, such as a search service, database, payment API or shell. A tool call is the structured request it sends to one of those tools. An endpoint is the service or interface that receives the request. A customer database API, a file system interface and an MCP server can all be endpoints.
A model can produce a plausible action without having authority to perform it. That distinction is the centre of a secure design:
- The model proposes what to do.
- Application code validates the request's shape and meaning.
- A policy engine checks who or what may do it, under which conditions.
- The endpoint applies its own access controls.
- Logs record the request, decision and result.
This is separation of alignment from authorisation. Alignment is the effort to make a model follow intended behaviour. Authorisation is the deterministic decision about whether an actor has permission to perform a specific operation. A well-written system prompt can influence the first. It cannot replace the second. Practitioner discussions on prompt rules vs structural limits for tool-calling and architectural guides like the runtime AI security reference reinforce that structural policy checks must remain independent of prompt logic.
For example, you might tell a support agent, "Never issue a refund above $100 without a manager." That instruction is useful, but it is not a security boundary. A runtime policy should independently reject a refund above the permitted amount unless an authorised approval is attached. The policy should still work if the model misunderstands the instruction or the conversation includes malicious content.
Why are tool-calling agents vulnerable to prompt injection?
Prompt injection happens when text that should be treated as data influences the model as if it were an instruction. Direct prompt injection comes from a user who deliberately tries to change the agent's behaviour. Indirect prompt injection is hidden in material the agent reads, such as an email, web page, support ticket or retrieved document.
Imagine an agent that reads supplier invoices and can update payment details. A malicious invoice includes a note telling the agent to ignore previous directions and send the account number to an outside address. The instruction is part of the invoice content, but the model processes it in the same general context as other language. It may follow the hostile instruction, or it may produce a tool request influenced by it.
The risk increases when the agent has broad permissions. If its database credential can read every customer record, a compromised request may expose far more information than the current task requires. If its payment tool can send funds without a limit or review, an incorrect tool call can become an irreversible business action.
This is why "the model knows not to do that" is not a sufficient control. Instructions and untrusted content share the model's input context. Research on how to detect prompt injection in production AI agent workloads and hands-on analyses of prompt injection attacks on tool-calling agents describe the challenge and the need to design systems that limit the impact of a successful attack. You still need controls around the model's authority and execution path.
Common ways hostile content reaches agent workflows include:
- Retrieved documents in a retrieval-augmented generation system, or RAG. RAG searches a collection of documents and supplies relevant passages to the model.
- Email and customer messages that include instructions aimed at the agent rather than the human reader.
- Tool descriptions or server responses that attempt to redirect the agent.
- Encoded or obfuscated text that is hard for a person to notice but still meaningful to a model.
- Data returned by one tool that is passed into another tool call without validation.
Model Context Protocol, or MCP, standardises a way for AI applications to connect to tools and data sources. That makes integrations easier to structure, but it does not make every MCP server trustworthy. A tool may have an overly broad description, request more data than it needs, or send information to an unintended destination. Treat MCP as a connection protocol, not as an authorisation system. PADISO's MCP server development service can help teams design the server and its permissions as part of the application architecture.
The core operational question is not only "Can we detect the malicious instruction?" It is also "If the model is influenced, what can it actually do?" Detection can help, but limiting permissions and checking every action reduces dependence on perfect detection.
What can OpenAI Shirudo teach us about agent security?
OpenAI and Cisco announced Shirudo on 23 November 2026, according to the official OpenAI post introducing Shirudo and joint reporting from Cisco's announcement on safeguarding agentic AI. Shirudo is an open-source project for applying runtime safeguards to Linux systems. It uses AI coding agents to help create narrow mitigations for software vulnerabilities, then puts those mitigations through verification and controlled delivery steps. The Shirudo repository describes the project and its implementation.
The problem Shirudo addresses is the gap between discovering a vulnerability and deploying a permanent software patch. A temporary mitigation, sometimes called a virtual patch, can block a known exploit path while the team prepares or rolls out a full fix. Shirudo's approach is relevant to agent security because it does not treat generated code as trustworthy simply because an AI produced it.
A simplified view of Shirudo's pipeline is:
- Analyse the vulnerability. An AI coding agent reviews information about a vulnerability and the relevant code path.
- Generate a narrow mitigation. The proposed shield targets a specific trigger or execution path, rather than changing the whole system.
- Test for attack prevention. A reproducer checks whether the exploit still works when the mitigation is active.
- Test for normal behaviour. A separate test checks that legitimate requests and workloads continue to function.
- Require human review and signing. An authorised operator reviews and signs the mitigation package before deployment.
- Enforce at the host. Kernel controls and hardware-backed evidence help ensure that only permitted code is loaded and that changes can be audited.
Shirudo uses eBPF, a Linux technology that can run small programs in the kernel to observe or control selected system behaviour, as highlighted in Isovalent's analysis of the Cisco and OpenAI project. A kernel is the core part of an operating system that manages hardware and system resources. Because eBPF programs operate close to this boundary, controls around loading them matter. Shirudo's design uses signed packages, restrictions on loading programs and TPM-based attestation, according to technical breakdowns of agent-written Linux security shields. A TPM, or Trusted Platform Module, is a hardware component that can store keys and record measurements of system state.
The key lesson is not "use eBPF for every AI agent." It is to put a policy boundary between generated intent and privileged execution. The agent can help draft a mitigation, but an independent verification path checks its behaviour, an authorised person approves it, and the host refuses unauthorised code.
For a customer-support agent, the equivalent might look like this: the model proposes a refund; application code checks the amount and customer; a policy engine checks the limit and approval state; a human approves an exception; and the payment service only accepts a scoped credential for that transaction. The layers differ from Shirudo, but the underlying design principle is similar.
Shirudo is not itself a system for inspecting prompts or MCP calls. It is a reference for controlled execution in a high-impact environment. Use it to ask better architecture questions: What can the agent generate? Who verifies it? What prevents it from reaching a privileged system? What evidence shows what happened?
Where should runtime controls sit in an agent architecture?
A useful design places checks at more than one boundary. No single filter can reliably identify every hostile instruction, and a single gateway is not enough if an agent can bypass it and reach a tool directly. Identifying and isolating runtime gaps across applications is critical for mitigating vulnerabilities before calls touch downstream APIs.
| Layer | What it checks | Example control | What it limits |
|---|---|---|---|
| Input and retrieval | Content entering the model | Source allowlists, document labelling, prompt-injection screening | Exposure to hostile or irrelevant content |
| Tool gateway | Proposed tool call | Schema validation, method allowlists, parameter limits | Malformed or out-of-scope requests |
| Policy engine | Actor, action and context | CEL expressions or OPA/Rego policies | Actions that violate business rules |
| Tool and data service | Actual credentials and operation | Scoped tokens, row-level permissions, transaction limits | Damage if upstream checks fail |
| Runtime isolation | Process and network behaviour | Containers, microVMs, eBPF enforcement, egress rules | Shell escape, unauthorised processes or connections |
| Human approval | High-impact exceptions | Approval workflow with identity and action details | Irreversible actions without review |
| Evidence and monitoring | Decisions and outcomes | Structured logs, alerts, signed or tamper-resistant records | Missing or unreliable incident evidence |
A gateway is a controlled entry point between an agent and its tools. It should be the only route to sensitive APIs where possible. If an agent can also access the same service through a direct network connection, it may bypass the gateway's checks.
A policy engine evaluates explicit rules. For instance: "This agent may read an invoice if it belongs to the current organisation, but it may not change supplier bank details." Common Expression Language, or CEL, and Open Policy Agent, or OPA, with its Rego policy language, are ways to express such rules. The useful property is that the rule is evaluated by software with defined inputs, not inferred from a model's natural-language judgement.
A schema defines the allowed shape and types of a request. If a refund tool expects a customer ID, amount and reason, schema validation can reject a missing customer ID or a string where a number is expected. But a valid schema does not make a request safe. The amount could be valid as a number and still exceed policy. Schema validation checks form; authorisation checks permission and context.
The OWASP 2026 Agent Control Standard describes an approach to middleware that can inspect, permit, modify or block agent actions before they reach downstream services. Standards and implementations evolve, so check the current project material before selecting a control. In practice, teams should also make sure their existing API gateway, identity system and application services enforce the same underlying permissions.
Host-level controls cover actions that happen below the application layer. For example, a tool might launch a process, access a file or open a network connection. Linux projects such as Cilium Tetragon provide eBPF-based observability and runtime enforcement, which technical overviews of eBPF shields for unpatched Linux highlight as an essential layer for containing arbitrary code. Host enforcement complements tool-call checks, but it does not understand the business context of a refund or customer record. Use it for the controls it can see, not as a substitute for application policy.
How do you secure a tool call before it reaches an endpoint?
Use a decision path that is predictable, testable and difficult to bypass. The following pattern works for a tool that can change business data.
1. Give the agent a narrow tool contract
A tool contract says what the tool does, which inputs it accepts and what it returns. Make it specific. Prefer get_invoice(invoice_id) and request_refund(invoice_id, amount) over a single manage_finance(action, payload) tool that can do many unrelated things.
A narrow contract reduces the number of actions the model can request. It also makes the policy easier to review. Do not expose a general SQL console or shell to a business agent when a small set of typed operations will do.
2. Validate the request as data
Parse the tool request and reject unexpected fields, invalid types and out-of-range values. Do not rely on the model's claim that a request is safe. Validate identifiers against the current user, organisation and workflow state. Escape or parameterise queries so user-controlled strings cannot change the meaning of a database command.
For example, an agent that can create a support case might accept a case category from a fixed list, a short description and the authenticated customer's ID. It should not accept an arbitrary database table name or a user-supplied account ID without checking that the caller can access it.
3. Evaluate a deterministic policy
The policy should consider the action, identity, target and context. That might include the agent's service identity, the user's role, the record's organisation, the amount, the reason and whether approval exists. Keep the policy outside the prompt, in code or a policy service that can be reviewed and tested.
A strong policy decision is specific. "Allowed" should mean this agent may perform this operation on this resource under these conditions. Avoid broad rules such as "trusted agent can write to customer database." The model's reputation or vendor should not determine access.
4. Use least privilege at the endpoint
Least privilege means granting only the access needed for a defined task. The tool service should use a credential that cannot do more than the tool requires. A read-only lookup tool should not share a credential with a write tool. Where possible, use short-lived credentials scoped to a specific user, tenant, resource or operation.
This layer matters because an application bug or gateway bypass can happen. If the underlying database credential can only read a limited set of records, a compromised agent has less access to misuse.
5. Add step-up approval for high-impact actions
An approval step asks an authorised person to confirm an action before execution. It should show the exact operation and target, not just a vague message like "Approve agent request?" Include key details such as the account, amount, destination and reason. Bind the approval to the specific request so it cannot be reused for a different action.
Do not require a person to approve every harmless read. That creates fatigue and slows the workflow without improving control proportionately. Use autonomy zones: read-only or reversible low-impact tasks can run automatically; sensitive changes, external transfers, deletion and changes to access controls can require approval.
6. Record the decision and result
Capture the agent identity, user or workflow identity, tool name, relevant parameters, policy decision, approval reference and endpoint result. Redact sensitive data where appropriate. Logs should help answer what happened and why, while avoiding creating a second store of unnecessary personal information.
Monitor both blocked and permitted calls. A spike in rejected calls can reveal an attack, a broken prompt or an integration change. Repeatedly allowed calls with unusual targets may reveal a policy that is too broad. Alert on patterns that matter to your service, and make sure someone owns the response.
What should you do when an agent uses MCP?
Treat each MCP server and tool as a separate trust boundary. An MCP server exposes tools or resources to an AI application. Its description helps the model understand what it can do, but that description is not a security policy. The server should still authenticate callers, validate inputs and enforce access in the service that performs the action.
Before connecting a server, ask:
- Who operates it, and how is its software updated?
- What data can it read or send, and where does that data go?
- Which credentials does it receive, and are they scoped to the task?
- Can you disable individual tools or limit their methods?
- Does it log tool calls and policy decisions without exposing unnecessary secrets?
- Can an agent reach the same endpoint through another path?
Pin or otherwise control the versions of tools and servers you deploy. Review changes to tool descriptions and permissions. A small wording change may alter what the model thinks a tool can do, while a code change may alter what the server actually permits. Review both.
Do not pass credentials through model-visible text. Keep secrets in a credential broker or the server-side execution environment. The agent should request an operation, not receive a reusable API key that it can copy into a prompt or send through another tool.
For teams building MCP servers, PADISO's MCP development service is relevant where the work includes tool boundaries, identity and deployment design. For wider platform decisions, our enterprise architecture and platform engineering service can help align agent controls with existing cloud and security architecture.
How do you balance protection with latency and usability?
Every extra check has a cost. A second model call that classifies every tool request may add time, expense and another source of uncertainty. For many high-confidence rules, deterministic validation is faster and easier to reason about: check a schema, compare a numeric limit, verify a resource owner or confirm an approval token.
Use model-based screening where it can add value, such as identifying suspicious content or helping triage ambiguous cases. Do not make a second model the sole authority for a high-impact action. If it approves a request, the endpoint should still enforce identity and permissions.
Measure latency across the full path, not just the policy service. A tool call includes model response time, network hops, authentication, policy evaluation and downstream execution. Decide which actions can wait for review and which need a fast, automated path. Put fast checks first, then invoke costlier screening or human approval only when the action's risk justifies it.
A practical set of autonomy zones might look like this:
| Zone | Example | Typical control |
|---|---|---|
| Read-only and low impact | Search approved internal knowledge | Source access rules, logging and data minimisation |
| Reversible change | Draft a case note or prepare an order | Schema and policy checks, with a clear undo path |
| Sensitive change | Update customer details or issue a refund | Strong identity checks, limits and approval for exceptions |
| Irreversible or externally consequential | Delete records, send funds or change access | Step-up human approval, scoped credentials and independent audit |
This is not a universal classification. Your risk assessment should reflect the service, data and consequences. A read can still be high risk if it exposes health or financial information. A write can be low risk if it only creates a draft that no one else can see. Classify the action by its effects, not just by whether it reads or writes.
How does runtime AI security fit Australian governance?
Australian organisations should map agent controls to their existing obligations and risk processes. APRA-regulated entities should assess how agent tools affect information security, operational risk and service-provider oversight under relevant requirements, including CPS 234 and CPS 230. The exact obligations depend on the entity, service and deployment. Do not assume that adding an AI gateway alone demonstrates compliance.
For personal information, consider the Privacy Act and the Australian Privacy Principles. Purpose, access, disclosure, retention and security all matter. An agent that retrieves personal data should only receive what is needed for the task, and its tools should not make unauthorised disclosure easy. Runtime filtering and scoped access can support those controls, but they do not replace privacy impact assessment, governance or legal advice.
Keep evidence that shows how the system is controlled. A useful record includes the agent's purpose, the tools it can call, data classifications, policy rules, credential design, approval points, test results, monitoring ownership and incident response path. Revisit the record when tools or models change. A model update can alter behaviour, and a tool update can expand what the agent can do.
For regulated financial services and insurance teams, PADISO's AI work in financial services and AI work in insurance are relevant starting points for connecting agent design to the operating environment. A control is useful only when it fits the organisation's systems, obligations and ways of working.
A practical runtime security plan for your first agent
You do not need to start by buying a standalone AI security platform. Start with the action the agent will perform and build the smallest control set that makes that action safe enough to test.
Define the action and its worst credible consequence
Write down the agent's purpose in operational terms. "Help with customer support" is too broad. "Find an order, draft a reply and create a return request for an eligible order" is more testable. List what could go wrong if the agent were influenced by hostile content, used the wrong record or received a bad tool response.
Map the data and permissions
Trace the request from user input through retrieval, model context, tools, services and logs. Record which systems hold personal or commercially sensitive data. Identify credentials and network routes. Check for direct paths that could bypass a planned gateway.
Classify tools by impact
For every tool, record whether it reads or changes data, whether the action is reversible, which users or organisations it can affect, and what happens if it is called incorrectly. Separate read and write operations rather than bundling them into broad tools.
Put policy at the execution boundary
Implement schema validation and deterministic authorisation before each sensitive tool call. Make the downstream service enforce its own permissions. If the agent can run code or interact with files, add process and network isolation appropriate to that risk. Host-level tools such as Tetragon may help with visibility or enforcement on Linux, but they need to be configured for the environment and paired with application controls.
Test hostile and ordinary cases
Test both attack prevention and correct operation. Include indirect instructions in documents, unexpected tool output, malformed parameters, requests for other tenants' data and attempts to exceed limits. Then test normal workflows to make sure controls do not block valid work. Methodologies like agent evaluation for adverse risk emphasize this balance between blocking exploits and maintaining ordinary workload execution, mirroring the distinction in Shirudo between checking that an exploit is blocked and checking that ordinary workloads still operate.
Roll out with limited authority
Start with a small group, a narrow set of tools and low-impact operations. Monitor decisions and failures. Keep a manual fallback. Expand permissions only when tests and operational evidence support the change. Treat each new tool, data source or write action as a change to the risk profile.
Common mistakes to avoid
Treating the system prompt as a permission boundary. Prompts guide model behaviour, but they do not enforce access. Put permissions in code, policy and the service that performs the action.
Giving the agent a general-purpose tool. A shell, unrestricted SQL interface or broad administrator API turns a model error into a potentially wide incident. Expose small, task-specific operations instead.
Relying on input screening alone. A filter may miss a novel or disguised instruction. Assume some hostile content will get through and limit what an agent can do after it does.
Using one shared credential. A shared credential makes it difficult to distinguish users, tasks and agents, and can grant more access than necessary. Use scoped identities and separate read and write permissions.
Approving actions without binding the approval. Approval should cover the exact operation and parameters. If the request changes after approval, require a new decision.
Logging everything verbatim. Logs help incident response, but unrestricted copies of prompts and tool output may contain personal information or secrets. Log enough to reconstruct decisions, with access and retention controls.
Assuming an AI security product replaces application security. A gateway can inspect traffic, but it cannot fix every permission error in a downstream service. Maintain ordinary identity, API, data and infrastructure controls.
Where PADISO fits
PADISO helps teams design AI agents, tool boundaries and the platform controls that let them operate safely. We can work through the use case, threat model, permissions, policy and production architecture as part of our AI automation service or platform engineering service. The first step is to map one real workflow and identify which actions should be automatic, checked or approved.
The next step
Choose one agent workflow and list every tool call it can make. For each call, write down the data it touches, the worst credible consequence, the policy that should allow or block it and the evidence you need afterwards. If you want help assessing whether the workflow is ready, take the PADISO AI readiness test.