TL;DR: Claude Code Security scans code for vulnerabilities using contextual reasoning, but it remains a pre-deployment control that cannot see what AI agents do at runtime, according to Anthropic. The real security gap is visibility into non-human identities, not just faster shift-left scanning, and that makes agent governance a parallel requirement, not a later fix.
NHIMG editorial — based on research published by Entro Security.
Questions worth separating out
Q: How should security teams govern AI coding tools that create non-human identities?
A: Teams should treat every AI coding tool that can authenticate or call systems as a non-human identity with an owner, a scope, and a lifecycle.
Q: Why does shift-left security not fully solve AI agent risk?
A: Shift-left controls reduce defects before deployment, but AI agent risk continues after release when the tool is live and operating with credentials.
Q: What is the difference between scanning AI-generated code and governing AI agent identity?
A: Scanning AI-generated code evaluates the safety of what gets built, while governing AI agent identity controls what the agent can do once it is running.
Practitioner guidance
- Map every AI agent to a managed identity Create an inventory of the service accounts, API keys, and tokens used by coding assistants and agentic workflows.
- Separate pre-deployment scanning from runtime monitoring Use code analysis to catch defects before release, but add controls that watch live agent activity after deployment.
- Enforce least privilege for ephemeral agent access Limit each agent credential to a narrow task scope and short lifetime, then revoke it automatically when the task ends.
With 85% of organisations lacking full visibility into third-party vendors connected via OAuth apps, according to The State of Non-Human Identity Security, the broader lesson is that identity blindness is already a programme-level risk, not a niche issue?
👉 Read Anthropic's analysis of Claude Code Security and AI agent runtime risk →
Explore further
View Full Forum → | NHI Foundation Course → | Our Services →