By NHI Mgmt Group Editorial TeamDomain: Agentic AI & NHIsSource: HighflamePublished July 23, 2026

TL;DR: AI runtime security is the control layer that catches prompt injection, data leakage, and rogue tool calls only visible once an agent is running, not during pre-deployment scans, according to Highflame. The core issue is assumption collapse: safe lab results do not prove safe production behaviour, especially when agents act through live prompts, tool calls, and delegated identity.


At a glance

What this is: This is an analysis of AI runtime security and its key finding that production agent behaviour creates risks build-time scans cannot see.

Why it matters: It matters because IAM, PAM, and NHI teams need controls that evaluate each AI action in production, not just approve the model before deployment.

👉 Read Highflame's analysis of AI runtime security and production agent risk


Context

AI runtime security is the practice of governing what an AI system is allowed to do while it is running, not just whether the model and application passed pre-deployment checks. In this article's framing, the primary governance gap is that clean build-time results do not constrain prompt injection, tool misuse, or data leakage once the agent is operating against live systems.

For IAM and NHI programmes, that distinction matters because agent behaviour is an access problem as much as a model problem. If a system can read files, call tools, and make requests on behalf of a user or service, then request-time authorization, short-lived identity, and revocation become runtime controls, not after-the-fact hygiene.

The source also uses a breach-style example to show why runtime matters: the attack existed only once the agent was running. That is typical of production AI risk, not an edge case, because many failures are triggered by real traffic, live context, and delegated access rather than by static code alone.


Key questions

Q: What breaks when AI agent controls are only applied at build time?

A: Buildtime checks alone do not stop a deployed agent from drifting into unsafe behavior during execution. Once the agent is live, prompt injection, unauthorized data access, and tool misuse can still occur if there is no runtime enforcement. Security teams need continuous controls that inspect context, block risky actions, and preserve auditability across the full lifecycle.

Q: Why do AI agents need request-time authorization instead of session approval?

A: Because the risky decision is often the next action, not the overall session. A session can look legitimate while a specific tool call, file read, or external request is not. Request-time authorization lets security teams evaluate intent, scope, and context at the moment of execution, which is the only point where an agent's behaviour can still be stopped.

Q: What signals show that AI runtime controls are failing?

A: Warning signs include unexplained tool usage, access to data outside the expected workflow, repeated policy overrides, and behavioural drift across sessions. If teams cannot trace why an action happened, who authorised it, and what context the system used, runtime controls are too weak to trust.

Q: Who is accountable when an AI agent uses delegated access incorrectly?

A: Accountability should follow the delegated authority chain, not stop at the agent label. The relevant owners are the teams responsible for the human identity, the service identity, the workflow, and the policy that allowed the action path. If those responsibilities are not explicit, incident review will be incomplete and remediation will focus on the wrong layer.


Technical breakdown

Why build-time AI security misses live prompt injection

Build-time security checks the model, application, or agent before deployment, using scans, red-team tests, and evaluations to find known weaknesses. Runtime security sits on the request path and evaluates each prompt, tool call, and action as it happens. That matters because prompt injection is often delivered through a document, webpage, or tool result that is harmless at rest but dangerous in context. The vulnerability is not the artifact itself. It is the action the agent takes after reading it. Practical implication: if policy is only enforced before deployment, the control plane cannot see the attack that appears in production traffic.

Practical implication: move policy enforcement into the request path so live actions can be checked before they execute.

Agent authorization and the difference between outputs and actions

Agentic systems are different from ordinary application outputs because the security decision is about what the system does, not just what it says. Agent authorization checks whether a specific action, tool, or delegation is allowed right now, on behalf of the correct identity, in the current context. This is especially important where the agent can make a sequence of legitimate calls that become unsafe in aggregate. A single step may look valid, but the chain can still produce exfiltration or overreach. Practical implication: govern tool use at the action level, not just the conversation level.

Practical implication: authorize each tool call and delegation hop independently instead of trusting the session as a whole.

Runtime revocation and cascade shutdown for delegated identities

Runtime security depends on the ability to cut access immediately when behaviour turns suspicious. In agentic environments, that means revoking the agent identity and any delegated credentials it spawned, not waiting for token expiry or a human review cycle. This is a classic NHI governance pattern, but the speed requirement is tighter because agent actions can happen at machine speed. The article's example shows why short-lived secrets alone are not enough if the system cannot terminate active authority on detection. Practical implication: design revocation to cascade across the delegation tree in seconds, not hours.

Practical implication: make revocation cascade across the delegation tree as soon as abnormal behaviour is detected.


Threat narrative

Attacker objective: The attacker wants the AI system itself to execute the disclosure or misuse path while appearing to follow normal instructions.

  1. Entry occurs when a developer clone or document contains instructions that the running agent reads as context, turning a benign file into an operational trigger.
  2. Escalation happens when the agent follows those instructions to search for credentials, then uses the discovered secret to make a live request or tool call.
  3. Impact is achieved when the agent posts data to an external endpoint or performs other delegated actions that expose secrets or sensitive information.

Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Build-time approval is not a proxy for production safety: The article is right to separate pre-deployment testing from runtime control, because the attack only exists once the agent is consuming live input. Build-time scanning can tell you that a model or app compiled successfully, but it cannot answer whether the next tool call is appropriate. The implication for identity programmes is that runtime authorisation must sit alongside pre-release assurance, not behind it.

Agent runtime security is an identity problem, not just an AI safety problem: Once an AI system can read files, call tools, and act on behalf of a user, the control question becomes who or what is authorised to do each thing right now. That puts the issue squarely in NHI governance, including scoped credentials, delegation control, and revocation. Practitioners should treat agent actions as identity events with security consequences.

Runtime decisioning is the named concept this market keeps underestimating: the policy decision is made at the moment of execution, after the prompt, context, and tool result are known. That is a different operating model from static posture management or pre-flight scanning. Security teams need to recognise that the risk is not the model artefact but the live decision boundary around each action.

Long-lived delegated access is the fragility the example exposes: The breach pattern only works when a harvested secret remains useful long enough for the agent to exploit it. That means standing privilege, broad delegation, and delayed revocation are the real failure modes. The implication is that identity governance for AI has to be measured in minutes and actions, not in annual review cycles.

Production AI needs governance that assumes hostile context: A clean lab test does not change the fact that documents, web pages, and tool outputs can contain adversarial instructions. This aligns with the broader OWASP NHI and agentic application risk model, where runtime context poisoning and tool misuse are first-class concerns. Practitioners should design controls for adversarial input as a normal operating condition, not an exception.

From our research:

  • The average estimated time to remediate a leaked secret is 27 days, despite 75% of organisations expressing strong confidence in their secrets management capabilities, according to The State of Secrets in AppSec.
  • Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap.
  • The right next read is Ultimate Guide to NHIs , Static vs Dynamic Secrets, which connects secret lifecycle control to runtime risk.

What this signals

Runtime control is the missing governance layer for production AI. The market has spent years optimising pre-deployment checks, but agent behaviour is decided at execution time, where live prompts and tool results can still redirect the system. That is why AI runtime security belongs alongside OWASP Agentic AI Top 10 thinking and not underneath it.

Secrets and delegation need to be treated as a single runtime problem. When a secret is harvested during an active session, the issue is not only leakage but how far that credential can travel before revocation. With 43% of security professionals concerned about AI systems learning and reproducing sensitive information patterns from codebases, the governance burden is no longer theoretical.

Runtime decisioning changes the operating model for IAM and NHI teams. Organisations that already monitor workload identity and privileged access should extend those controls to agent action boundaries, especially where tool use is mediated by NIST AI Risk Management Framework governance expectations. The practical shift is from periodic review to live enforcement.


For practitioners

  • Enforce request-time authorization for every agent action Check each prompt, tool call, and agent-to-agent hop against policy before execution, so approval is tied to the current context rather than the session as a whole.
  • Scope agent identities to short-lived, task-bound credentials Bind each agent to narrowly scoped credentials with minimal delegation so any harvested secret has limited reach and a short usable life.
  • Add live detection to the decision path Feed injection patterns, anomalous call sequences, and sensitive-data signals into the same control that evaluates the next action, not a downstream review queue.
  • Prepare cascade revocation for the full delegation tree When behaviour turns suspicious, terminate the agent identity and every credential or sub-agent it spawned, rather than waiting for expiry or manual triage.

Key takeaways

  • AI runtime security addresses the gap between a clean pre-deployment scan and unsafe live agent behaviour.
  • Production AI risk is an identity and authorization problem because the dangerous event is the action, not the model artefact.
  • Teams need request-time control, live detection, and cascade revocation if they want to govern agents in real time.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF, NIST Zero Trust (SP 800-207) and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10NHI-03Runtime tool misuse and prompt injection are core agentic risks here.
OWASP Non-Human Identity Top 10NHI-03Delegated agent credentials and secret exposure fit NHI governance patterns.
NIST AI RMFGOVERNRuntime AI governance depends on clear accountability and policy enforcement.
NIST Zero Trust (SP 800-207)3.3Continuous verification aligns with request-time authorization for agents.
NIST CSF 2.0PR.AC-4Least-privilege access management underpins scoped, short-lived agent identity.

Treat agent credentials as NHIs and limit standing access with tight lifecycle controls.


Key terms

  • AI Runtime Security: AI runtime security is the set of controls that inspect, constrain, and respond to model behavior while the application is live. It includes detection, masking, policy enforcement, and response shaping, all aimed at reducing the blast radius of unsafe model interactions.
  • Agent Authorization: Agent authorization is the decision process that determines whether a software agent may take a specific action at runtime. It evaluates context, delegated authority, and resource sensitivity at the moment of execution, not only at login or provisioning time.
  • Cascade Revocation: Cascade revocation is the rapid removal of an agent's authority and any credentials, tokens, or sub-agents that depend on it. In runtime AI environments, it is the only practical way to stop a delegated action chain before more damage occurs.
  • Request-time enforcement: Request-time enforcement is the practice of evaluating a proposed access change before it becomes active. In identity governance, this shifts SoD from a retrospective review activity into a preventive control that can block, escalate, or reroute risky entitlement combinations.

What's in the full article

Highflame's full article covers the operational detail this post intentionally leaves for the source:

  • Inline enforcement examples for prompt, tool, and agent-to-agent requests
  • The vendor's view of how runtime policy, detection, and revocation work together in practice
  • A comparison of build-time AI security and runtime controls across live traffic paths
  • Implementation context for teams deciding where runtime checks should sit in the request path

👉 Highflame's full article covers runtime enforcement, request-path controls, and the production gap build-time scans miss

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM or security programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on September 2, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org