By NHI Mgmt Group Editorial TeamBased on Crogl: “Do Your Agents Know Your Secrets?” (April 20, 2026)

TL;DR: AI SOC agents can rotate credentials and trigger tools, but that autonomy turns secrets handling into the core control problem because API tokens, OAuth credentials, and service accounts can leak through prompts, logs, and external systems, according to Crogl. The practical issue is not whether an agent can see a secret, but whether security can govern who or what can trigger its use.


At a glance

What this is: This is Crogl's analysis of why AI agents that operate security workflows turn secrets handling into the control plane, because the key question shifts from secret exposure to governed invocation.

Why it matters: IAM, PAM and NHI teams need to treat agent access as a governed execution problem, because autonomous workflows can expand privilege and trigger actions without the traditional review points that human-led processes assume.


Context

AI agents that can query security tools, isolate endpoints, or rotate credentials are no longer just interfaces. They become non-human actors that need governed access, because the moment they are allowed to act, secrets, tokens and service account permissions become part of the control plane.

The governance gap is not only secret leakage. It is the assumption that access can be safely granted, observed and reviewed after the fact, when an agent may trigger use of a credential without ever seeing the secret itself. That shifts the problem into NHI lifecycle, scope and policy design.

Crogl frames this around agentic security operations, where the architecture determines whether secrets remain isolated or are pushed into prompts, traces and tool chains.


Key questions

Q: What breaks when AI agent access relies on long-lived secrets?

A: Long-lived secrets let AI agents carry persistent access far beyond the task they were created for. That increases theft risk, complicates offboarding, and makes it harder to prove scope at audit time. Secretless, short-lived access is safer because the credential exists only for the current task and runtime context.

Q: Why do AI agents increase secrets management risk even when the model never sees the secret?

A: Because the credential can still be used downstream through tool calls, delegated execution or external systems. The model may be blind to the secret while still being able to cause actions that depend on it. That creates a governance gap between visibility and authority, especially when permissions are broad or persistent.

Q: What signs show that third-party NHI access is too broad?

A: Watch for shared secrets across multiple integrations, long-lived tokens with no clear owner, CI/CD identities that can reach production broadly, and vendor accounts that remain active after the relationship changes. Those are strong indicators that external access has outgrown its original purpose.

Q: How should teams govern AI agents that act inside customer accounts?

A: Treat them as delegated non-human identities, not as ordinary customer sessions. Governance should require explicit consent, narrow authorization scope, token binding, and a complete audit record tying each action back to the human principal that approved it.


Technical breakdown

Why agentic security workflows turn secrets into an execution problem

An AI agent that can take action against enterprise systems is not just consuming data, it is exercising delegated authority. In these architectures, the credential may remain hidden from the model, but the agent can still initiate actions that depend on that credential being valid somewhere in the execution path. That changes the control objective from secret confidentiality to invocation governance. The important questions become which tools can be called, under what scope, and whether the action is attributable to a stable identity chain. This is why agentic systems often behave like secrets-handling systems even when the secret itself is never exposed to the model.

Practical implication: govern agent access as a delegated execution path, not as a simple secret storage problem.

How prompt, tool and trace leakage expand the secrets attack surface

Secrets can leak in several places once an agent uses external services: prompts, tool inputs, logs, traces and memory. Each location creates a different exposure mode. Prompt injection can cause the model to reveal or misuse sensitive material. Tool chaining can pass credentials into systems the architecture did not intend. External LLM providers add another boundary where data may be retained or observed. This is why the article links agentic designs to familiar failure modes such as sensitive data exposure, excessive agency and insecure tooling. The risk is architectural, not accidental, because the data path itself crosses trust boundaries.

Practical implication: map every point where secrets can enter, traverse, or persist in the agent workflow.

Why MCP changes the trust model without eliminating risk

Model Context Protocol reduces one class of exposure by keeping secrets out of the model prompt and letting the agent call tools through a structured layer. That is useful, but it does not remove the core governance issue. If the model cannot see the secret yet can still trigger the action that uses it, security now depends on policy enforcement around the tool and the action, not around the secret alone. The trust model shifts from disclosure prevention to controlled invocation. This is a better pattern, but only if the surrounding permissions, scoping and audit controls are designed to match it.

Practical implication: treat structured tooling as a control boundary that must be scoped, logged and policy-enforced.


  • Hugging Face Spaces breach 2024: Unauthorised access to Hugging Face Spaces may have exposed secrets users stored for AI apps; tokens were revoked and org tokens removed.
  • Dropbox Sign breach 2024: A compromised back-end service account gave attackers Dropbox Sign customer data, including API keys, OAuth tokens and MFA information.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Secret handling is becoming the control plane for agentic systems: once an AI agent can query, trigger and rotate across enterprise tools, the main governance question is no longer whether a secret is visible to the model. It is whether the surrounding identity and policy model can govern credential use as an authorised action path. That changes secrets from a storage problem into a runtime control problem. Practitioners should evaluate the full delegation chain, not just the vault.

Autonomous behaviour breaks the assumption that privilege is reviewed after it is exercised: access review processes were designed for credentials and entitlements that persist long enough to be observed. That assumption fails when an agent can acquire, use and release access inside the same workflow. The implication is that review cadences alone cannot govern agent access reliably; control has to move closer to issuance and invocation.

Agentic tooling makes excessive agency a governance issue, not just a technical misconfiguration: when agents have broad API reach, persistent credentials or weakly scoped tool access, the result is an identity boundary that no longer matches operator intent. The problem is not merely overbreadth. It is that the action boundary and the identity boundary have drifted apart. Practitioners should align permissions to the exact actions the agent may initiate.

Separation by design is the right direction for NHI governance: the strongest pattern in the article is not better secret storage, but architectural separation between intent and execution. That reduces the chance that the model becomes a credential conduit, while preserving attributable action in a controlled layer. For NHI programmes, that is the material shift: govern what can be triggered, not just what can be seen.

OWASP-NHI and agentic governance now intersect at the same failure point: secrets leakage, overprivileged identities and insecure tooling are no longer isolated categories when the actor is an agent. They collapse into one operational question: can a non-human identity initiate actions that exceed its intended scope? The practical conclusion is that identity governance, secrets management and agent policy design must be reviewed together.

From our research library:

What this signals

Identity control must shift from visibility to invocation: once an agent can trigger tool use without seeing the underlying secret, the security model can no longer rely on prompt hygiene alone. Access control has to govern which actions can be initiated, by which non-human identity, and under which policy boundary.

13% of organisations feel extremely prepared for the reality of agentic AI despite the majority racing toward autonomous adoption, according to the 2026 Infrastructure Identity Survey. That gap matters because the governance assumptions behind human-paced access review do not survive agent-timed execution.

Secrets isolation becomes a design requirement, not a preference: if the workflow requires the model to handle tokens, credentials or service account material directly, the architecture is already baking in unnecessary trust. The better programme question is whether the agent can complete the task without ever entering the secret path.


For practitioners

  • Define the agent as a governed executor Separate the logic that selects an action from the system that executes it, and ensure the executor applies policy, not the model.
  • Remove secrets from model context paths Audit prompts, tool payloads, traces and memory to ensure API tokens, OAuth credentials and service account material never enter the LLM context.
  • Scope tool permissions to exact actions Map every tool the agent can call to a narrowly defined permission set so that one credential cannot become a general-purpose control surface.
  • Log and attribute every agent-initiated action Record the actor, the triggering context, the tool invocation and the policy decision so that review and investigation operate on an auditable chain.
  • Treat third-party LLM boundaries as trust boundaries Review where external providers can observe, retain or process sensitive data, and constrain agent workflows so they do not require secret exposure outside the enterprise boundary.

Key takeaways

  • AI agents become a control plane problem when their usefulness depends on triggering secrets, not merely viewing them.
  • The article's key risk is the gap between secret visibility and authorised invocation, which widens as autonomy and tool access increase.
  • The control that matters most is separation by design: keep secrets out of model context and govern every tool execution through policy.

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, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageSecrets in prompts, traces and tool payloads are the article's core exposure concern.
NHI-04 — Insecure AuthenticationAgent workflows depend on how credentials are presented and validated across tools.
NHI-05 — Overprivileged NHIThe article warns that agents often receive broad, persistent access beyond task scope.
Recommendation — Remove secrets from prompts, traces and tool payloads before agents can invoke them. Use short-lived, strongly scoped authentication for every agent-facing tool path. Constrain agent privileges to the smallest action set needed for each workflow.
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe article centres on agents using delegated identity and excess privilege to trigger actions.
Recommendation — Audit agent identity paths for privilege escalation and scope creep across tool use.
CSA MAESTROAgentic identity and control boundariesStructured tooling and separated execution are central to the article's agent governance model.
Recommendation — Design agent controls so intent and execution remain separated by policy.
NIST AI RMFGOVERN — AI Governance and AccountabilityThe article's main issue is governance over who can trigger actions through an AI system.
Recommendation — Assign clear accountability for agent actions and enforce governance over delegated execution.

Key terms

  • Agentic Execution Layer: The controlled system layer that carries out actions selected by an AI agent. It keeps the model from directly handling credentials or invoking tools without policy enforcement, which is critical when the agent can initiate security operations or automate sensitive workflows.
  • Secrets handling: The set of practices used to create, store, transmit, and rotate credentials such as API keys, tokens, and certificates. Poor secrets handling in generated code can create standing access, leak privileged credentials, and undermine both application security and broader identity governance.
  • Invocation Governance: The policy and control structure that decides whether an agent may trigger a tool, workflow or credential-backed action. It matters when the model does not need to see the secret but can still cause it to be used through downstream systems.
  • Delegated Execution: Delegated execution is when software is allowed to perform actions on behalf of a user, process, or business function. In NHI governance, the risk is that the delegated actor may chain actions beyond the original intent, so controls must focus on scope, approval, and revocation.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle 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 programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on September 6, 2026.
Updated on October 11, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org