By NHI Mgmt Group Editorial TeamDomain: Cyber SecuritySource: ARMOPublished July 7, 2026

TL;DR: Kubernetes runtime security splits between detect-and-gate and observe-and-generate, with behavior-derived controls stopping the next attack before it runs, according to ARMO. For teams running Kubernetes and AI workloads at scale, the governance question is whether prevention should be learned from workload behavior or written in advance.


At a glance

What this is: This is an analysis of Kubernetes runtime security that compares detect-and-gate models with behavior-derived prevention and argues that generated least privilege changes the control plane for workload protection.

Why it matters: It matters because IAM and platform teams must decide whether workload boundaries, agent permissions, and container enforcement are static policies or continuously derived controls across NHI, autonomous, and human-operated systems.

By the numbers:

👉 Read ARMO's comparison of generated prevention versus Microsoft Defender for Cloud


Context

Kubernetes runtime security has shifted from simple detection toward deciding what a workload or AI agent is actually allowed to do. The central governance problem is that static policy written before deployment often lags behind real behavior, especially when containers, service accounts, and AI-driven workloads change tool use and network paths at runtime.

The primary identity question is whether least privilege is discovered from observed behavior or assumed in advance. That matters for NHI governance because workload identities, agent permissions, and runtime credentials are often the boundary attackers abuse after initial access. In this case, the starting position is typical for teams with mature cloud and container estates: they have telemetry, but not always behavior-derived enforcement.


Key questions

Q: What fails when Kubernetes security relies only on detect-and-gate controls?

A: Detect-and-gate can stop known bad activity, but it still depends on policies written before the workload’s real behavior is understood. That leaves a gap when applications, containers, or AI agents take new paths at runtime. The result is visibility without a reliably generated boundary, which attackers can exploit after initial execution.

Q: Why do AI agents make least privilege harder to enforce?

A: AI agents can move across multiple services, make autonomous decisions, and trigger several machine-to-machine actions in one task. That creates more opportunities for privilege creep, overuse, and lateral movement. Least privilege is harder when the system must authorise not only who is acting, but what the agent is doing right now.

Q: How do you know if runtime enforcement is actually reducing risk?

A: You know it is working when the control changes the expected loss curve rather than just generating logs. That means the policy must block behaviour, reduce exposure during the vulnerable window, and survive audit as a real compensating control. If the policy only proves that an issue exists, it is reporting, not reduction.

Q: Who should own enforcement when workload behaviour and identity both matter?

A: Platform, cloud security, and identity teams should share the operating model, but a single accountable owner must approve policy changes. That is necessary because runtime enforcement affects both application function and identity privilege. Without clear ownership, teams will either over-permit to avoid outages or under-enforce to avoid disputes.


Technical breakdown

Detect-and-gate versus observe-and-generate

Both models begin with runtime telemetry, often from eBPF sensors in Kubernetes nodes. Detect-and-gate uses those signals to compare activity against policies that already exist, then blocks or alerts when a rule is violated. Observe-and-generate takes the same runtime data and builds a behavioral baseline for each workload, then derives a workload-specific policy such as network paths and syscall allowances. The technical distinction is important because prevention based on prior assumptions cannot fully capture how a workload or AI agent will behave once it starts chaining tools, calling services, or changing execution paths under load.

Practical implication: teams should decide whether their runtime controls are enforcing prewritten intent or deriving least privilege from observed behavior.

Behavior-derived least privilege for Kubernetes workloads

Behavior-derived prevention converts runtime observations into concrete controls such as NetworkPolicies and seccomp profiles. NetworkPolicies constrain which endpoints a workload can reach, while seccomp constrains which kernel syscalls it may execute. When generated from actual workload behavior, these controls reduce the chance that an attacker can reuse the container for actions the application never needed. This is especially relevant where service accounts, API tokens, or in-cluster execution paths provide a bridge from detection to deeper compromise, because runtime enforcement closes the gap between observed normal activity and allowed future activity.

Practical implication: scope container permissions from real behavior, not from generic cluster templates or image assumptions.

AI agent enforcement inside the cluster

AI agents create a harder runtime problem because their actions can vary with prompts, retrieved context, and tool chains. An agent may appear stable at deployment, yet diverge at execution by selecting different tools or touching different data sources. That makes interaction-layer detection useful but incomplete if enforcement stops at posture or alerting. In-cluster controls must therefore govern the syscalls, network calls, and tool use the agent is actually allowed to perform. This is where identity and AI security intersect directly: the agent behaves like a non-human identity whose privileges need a living boundary, not a static one.

Practical implication: treat AI agents as governed identities and enforce their runtime boundaries at the same layer where they execute.


Threat narrative

Attacker objective: The attacker wants to turn a legitimate workload into a pivot point for broader cluster access, exfiltration, or destructive infrastructure changes.

  1. Entry begins when an attacker gains execution inside a container or agent workload and can operate within the runtime boundary.
  2. Escalation follows when the workload is allowed to use broader syscalls, tool calls, or network destinations than it genuinely needs.
  3. Impact occurs when the attacker converts that excess runtime privilege into lateral movement, data exfiltration, or infrastructure manipulation.

NHI Mgmt Group analysis

Generated prevention is a governance model, not just a detection model. The architectural break is that runtime data is used to create least-privilege policy rather than only to confirm violations after the fact. That changes the control conversation for Kubernetes, AI workloads, and NHI governance because the policy boundary becomes evidence-based. Practitioners should view this as a move from static intent to living enforcement.

Behavior-derived controls expose the weakest assumption in container security: that prewritten policy can keep pace with real workload behavior. The article shows why that assumption fails when an application, agent, or service account changes paths at runtime. This is a direct NHI issue because workload identities and agent identities inherit whatever privilege the runtime boundary allows. The practical conclusion is that identity governance must extend into the runtime layer.

AI agents make generated least privilege more relevant because their runtime actions are variable by design. A static control model struggles when one prompt causes one tool chain and the next prompt causes another. That is why agentic AI security and NHI governance now overlap: the agent is an identity that needs continuous behavioral scoping. Teams should plan for runtime policy to become part of AI governance, not an optional add-on.

Signal quality matters as much as enforcement depth. Detection platforms can create more alerts, but workload operators still need a control that reduces future exposure rather than only describing current risk. The named concept here is runtime-derived least privilege: access boundaries built from observed workload behavior. That concept should guide how platform, IAM, and cloud security teams evaluate any runtime product that claims prevention.

What this signals

Runtime-derived least privilege will become a baseline expectation for Kubernetes and AI operations. The operational signal for practitioners is that telemetry alone will not be enough if a workload can still do more than its observed purpose. Teams should expect platform reviews to ask whether policy is prewritten, inferred, or continuously generated from behavior.

AI agent governance is moving into the same control plane as workload identity. That means IAM, platform engineering, and cloud security teams will need a shared model for service accounts, token scope, and in-cluster enforcement. The practical next step is to align runtime controls with identity lifecycle processes and verify that access can be narrowed as behavior becomes known.

Least privilege for non-human systems is no longer a static provisioning question. Teleport found that only 13% of organisations feel extremely prepared for agentic AI, while least-privileged AI access correlates with a 17% incident rate versus 76% for over-privileged systems. That gap should push teams toward governance that links behavior, ownership, and enforcement.


For practitioners

  • Define runtime ownership for workload identities Assign a named owner for each Kubernetes workload, service account, and AI agent that can approve or reject generated policies. Without ownership, behaviour-derived controls become orphaned artefacts that nobody reviews when the workload changes.
  • Pilot generated NetworkPolicies and seccomp profiles Start in observe mode, compare generated policies with current entitlements, then move to audit mode before enforcement. This lets teams validate that the policy reflects real workload behavior rather than inherited cluster assumptions.
  • Map container detections to identity and privilege paths When a runtime alert fires, trace which service account, token, or API key allowed the workload to expand beyond its expected boundary. This makes the investigation about the actual privilege path, not just the container event.
  • Separate AI agent posture from AI agent enforcement Use posture tools for discovery and inventory, but require runtime controls for the syscalls, tool calls, and network destinations an agent may use. That separation prevents teams from mistaking visibility for containment.
  • Test controls against realistic cluster behavior Run attack simulation against the same workloads that will go to production, then compare what the platform would block with what the application actually needs. Baselines that survive simulation are more likely to hold under real attacker pressure.

Key takeaways

  • Kubernetes runtime defense now splits into detection that reports and generation that constrains future behavior.
  • AI agents turn workload privilege into an identity problem because their allowed actions can change from one run to the next.
  • Teams that cannot derive least privilege from observed behavior will keep relying on alerts instead of reducing blast radius.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and NIST AI RMF set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-03Behavior-derived least privilege addresses unmanaged non-human access in runtime.
MITRE ATT&CKTA0006 , Credential Access; TA0008 , Lateral MovementOver-privileged runtime access enables credential abuse and movement inside clusters.
NIST CSF 2.0PR.AC-4Least privilege for workloads aligns with access control governance.
NIST SP 800-53 Rev 5AC-6AC-6 directly governs least privilege across human and non-human identities.
NIST AI RMFGOVERNAI agents need accountable governance for behavior and access scope.

Use NHI-03 to shrink workload permissions to observed behavior and revoke excess access paths.


Key terms

  • Continuous Least Privilege: A governance model that re-evaluates access as identity risk changes, rather than only at issuance or periodic review. In cloud environments, this means entitlements can be constrained or revoked when findings, posture, or behaviour indicate the access no longer fits the current state.
  • Detect-and-Gate: A runtime security approach that detects suspicious activity and blocks it against predefined rules. It can be effective for known patterns, but it depends on policy authored before the workload’s true behavior is known, which limits its ability to prevent novel misuse.
  • Observe-and-Generate: A runtime security pattern that watches workload behavior, builds a baseline, and then generates enforceable controls from that evidence. It is most relevant where workloads or AI agents behave differently over time and need a live boundary rather than a static assumption.
  • Runtime-Derived Least Privilege: Least privilege computed from actual execution traces, such as network calls, system calls, or tool use. It is a stronger fit for non-human identities because the boundary is anchored to observed purpose and can adapt as the workload’s behavior becomes better understood.

What's in the full article

ARMO's full blog covers the operational detail this post intentionally leaves for the source:

  • How generated NetworkPolicies and seccomp profiles are created from observed workload behavior
  • The stepwise observe, audit, enforce workflow used to operationalise runtime prevention
  • The concrete comparison between ARMO and Microsoft Defender for Cloud across Kubernetes depth, Azure integration, and compliance coverage
  • Examples of attack-story correlation across application, cloud, Kubernetes API, and host layers

👉 The full ARMO post includes the runtime workflow, attack-story examples, and Kubernetes control comparisons.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, secrets management, and agentic AI identity. It helps practitioners translate identity control principles into operating models for platform, cloud, and security teams.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org