TL;DR: AI agents create a trust gap when they are evaluated or operated through ephemeral NHI credentials, because the same access patterns that enable safe delegation also expose data leakage, prompt injection, and scope drift, according to ngrok. The real issue is that governance assumes stable, reviewable behaviour, but agent runtime decisions can invalidate that assumption within a single session.
NHIMG editorial — based on content published by ngrok: AI agent trust testing and ephemeral NHI access
Questions worth separating out
Q: What breaks when AI agents are given access through ephemeral NHI credentials?
A: Ephemeral credentials reduce persistence, but they do not eliminate behavioural risk.
Q: Why do AI agents complicate traditional IAM and authorization models?
A: AI agents complicate traditional IAM because they can act autonomously, use tools, and make requests without a human directly present at each step.
Q: How do security teams know whether an AI agent is operating safely?
A: Security teams know an AI agent is operating safely when its permissions, invoked tools, and accessed data remain consistent with the approved use case over time.
Practitioner guidance
- Define task boundaries before any agent gets credentials Write the agent’s allowed purpose, input scope, and forbidden outputs before issuing service accounts, tokens, or endpoint access.
- Separate context from instructions in every agent workflow Treat external input as data unless it has been explicitly authorised as a task directive.
- Redact sensitive material before agent evaluation Remove API keys, PII, secrets, and business-sensitive details from commit history, logs, and test payloads before they reach the model.
What's in the full article
ngrok's full article covers the operational detail this post intentionally leaves for the source:
- Step-by-step walkthrough of the local agent and evaluation wiring used to expose a private workload safely.
- Code-level examples showing how additional context was separated from the agent’s core task prompt.
- The exact test and scoring workflow that surfaced failure modes, including privacy leakage and instruction refusal issues.
- Implementation notes for adding boundaries, redaction, and output discipline to a commit-analysis agent.
👉 Read ngrok’s analysis of AI agent trust testing and ephemeral NHI access →
AI agent trust boundaries: what breaks when NHI access is ephemeral?
Explore further
Agent trust is now an identity problem, not just an AI quality problem. The article shows that an AI agent can pass a narrow task test while still leaking context, ignoring boundaries, or producing unsafe output. That means identity teams cannot treat agent evaluation as separate from access governance, because runtime behaviour is part of the trust decision. The practitioner conclusion is that agent identity must be validated by observed behaviour under stress, not by the presence of a service wrapper.
A few things that frame the scale:
- Only 52% of companies can track and audit the data their AI agents access, leaving 48% with a complete blind spot for compliance and breach investigation, according to AI Agents: The New Attack Surface report.
- 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems, inappropriately sharing sensitive data, and revealing access credentials.
A question worth separating out:
Q: Who is accountable when an AI agent accesses sensitive data it was not meant to use?
A: Accountability sits with the team that approved the agent, its connectors, and its policy boundaries, not with the runtime behaviour alone. Organisations need ownership for intent, permissions, monitoring, and validation so they can prove whether the agent stayed inside its approved purpose. Without that, audit and regulatory response become retrospective guesswork.
👉 Read our full editorial: AI agent trust breaks when evaluation uses compromised NHIs