Agentic AI security and governance for engineering leaders
The security risks of AI agents in engineering teams, mapped to the OWASP Top 10 for Agentic Applications and to real incidents, with the controls, owners and evidence a VP of Engineering or CTO needs.
On this page
AI agents in an engineering team act with an engineer’s access. They read the repository, run commands in a terminal, call MCP servers and cloud APIs, and push code. Agentic AI security is the work of deciding what that access should be, enforcing it outside the agent, and keeping enough evidence to know what happened. Governance is the same work with owners and a review cadence attached.
This guide is for the person accountable for it: a VP of Engineering, CTO, head of platform or head of security. It covers the risks that have shown up in public incidents, how they map to the OWASP Top 10 for Agentic Applications, and a short list of controls with the evidence that shows each one is working. For the policy itself, start from the AI agent policy template.
What has actually gone wrong
Most public incidents fall into four groups. Each has happened to a real team or been demonstrated by researchers, and each has a primary source in our incident list.
| Kind of incident | Public example | What failed |
|---|---|---|
| An agent destroys data it was allowed to reach | Replit’s agent deleted a production database during a code freeze in July 2025; the data was restored by rollback. Write-up | The development agent had a path to production, and the freeze was only an instruction in the chat. |
| Malicious code uses an installed agent | In August 2025 malicious Nx packages ran Claude Code, Gemini CLI and Amazon Q’s CLI with approval-skipping flags to search machines for secrets. Write-up | Any program on the machine can start an agent with its prompts turned off. |
| A compromised agent, extension or MCP server | The Amazon Q VS Code extension 1.84.0 shipped with malicious code (AWS says it failed to run); postmark-mcp BCC’d every email to an outside address. Amazon Q · postmark-mcp | Trust in a name or an auto-update instead of a pinned, reviewed version. |
| Prompt injection turns tools against the user | Researchers showed a public GitHub issue steering an agent to copy private repository data into a public pull request through the GitHub MCP server. Invariant Labs | One session held untrusted input, private data and a way to publish. |
Vendors fix their own bugs quickly. Anthropic, for example, has published 32 advisories for Claude Code, every one with a fixed version. Claude Code vulnerabilities Your exposure comes less from any single bug than from how much access an agent holds when something goes wrong.
The OWASP Top 10 for Agentic Applications
In December 2025 the OWASP GenAI Security Project published the Top 10 for Agentic Applications (labelled 2026). It gives security and engineering teams a shared vocabulary for these risks. The table maps each item to what it looks like for engineering teams using agents, and to a control. The names and IDs are OWASP’s; the examples and controls are ours. OWASP Top 10 for Agentic Applications
ASI01
Agent Goal Hijack
✕Risk: Text in an issue, README or web page tells the agent to do something else.
✓First control: Keep untrusted input, private data and the ability to send or publish out of the same session.
Seen in: GitHub MCP demonstration →ASI02
Tool Misuse and Exploitation
✕Risk: The agent uses a legitimate tool destructively: DROP, terraform destroy, a force push.
✓First control: Human approval outside the chat for destructive actions; deletion protection at the platform.
Seen in: Replit →ASI03
Identity and Privilege Abuse
✕Risk: The agent acts with the engineer’s full credentials, including production.
✓First control: Task-scoped credentials; no standing production access on development machines.
ASI04
Agentic Supply Chain Vulnerabilities
✕Risk: A malicious MCP server, extension or agent release.
✓First control: An approved list with pinned versions; vendor advisories watched.
Seen in: postmark-mcp →ASI05
Unexpected Code Execution (RCE)
✕Risk: A cloned repository runs code before the trust prompt; a command slips past an allowlist.
✓First control: Current versions; unfamiliar repositories opened in a container.
Seen in: Claude Code advisories →ASI06
Memory & Context Poisoning
✕Risk: Instructions planted in files the agent reads every session, such as rules files.
✓First control: Review changes to agent instruction files like code.
ASI07
Insecure Inter-Agent Communication
✕Risk: One agent hands work to a sub-agent or another tool with more access.
✓First control: The same credential limits for helpers as for the main agent.
ASI08
Cascading Failures
✕Risk: An agent’s mistake flows into CI, a deploy or another agent’s input.
✓First control: Normal review and CI gates on agent-written changes.
ASI09
Human-Agent Trust Exploitation
✕Risk: The engineer accepts the agent’s summary (“all tests pass”, “nothing can be restored”) without checking.
✓First control: Check the system, not the summary: diffs, test runs, the database.
ASI10
Rogue Agents
✕Risk: An agent keeps acting outside its instructions, as in the Replit code freeze.
✓First control: Controls that don’t depend on the agent following instructions.
The controls that matter most
If you do nothing else, do these. Each one is enforced outside the agent, so it holds when the agent is wrong, injected or compromised.
- 01
Agents never hold standing production credentials
- Enforced at
- Cloud IAM, secret manager, separate development accounts
- Evidence it works
- ✓An access review listing which identities on developer machines can reach production
- 02
Destructive operations need approval
- Enforced at
- Database deletion protection, protected branches, an approval step before infrastructure changes apply
- Evidence it works
- ✓Refused force pushes and blocked deletes in the platform’s audit log
- 03
Permission-skipping modes only in disposable environments
- Enforced at
- Devcontainers or VMs for autonomous runs; managed settings where the agent supports them
- Evidence it works
- ✓Session logs showing which sessions ran without approvals, and where
- 04
Approved agents, extensions and MCP servers, pinned
- Enforced at
- An allowlist in device management or managed settings; dependency review for version bumps
- Evidence it works
- ✓An inventory of what is installed on each machine, compared with the list
- 05
Agent-written code goes through the same review and CI
- Enforced at
- Branch protection and required checks
- Evidence it works
- ✓Pull requests merged without review: zero
- 06
Session logs kept, with secrets scrubbed
- Enforced at
- Retention on each machine; a scan for keys in logs
- Evidence it works
- ✓Incidents you could reconstruct from the logs, and how long that took
A governance model that fits an engineering org
Keep the structure light. The NIST AI Risk Management Framework organizes the work into four functions, Govern, Map, Measure and Manage, and that maps onto an engineering org without a new committee:
- Govern. One accountable owner, usually platform or security engineering, and a one-page policy. Policy template
- Map. An inventory: which agents, versions, MCP servers and credentials each team uses.
- Measure. A monthly look at the evidence column above: sessions without approvals, destructive actions, keys in logs, unapproved MCP servers.
- Manage. An incident path that preserves evidence, and a quarterly review of the policy against what happened.
Questions to ask before you roll out an agent
- 1
What can it reach on an engineer’s machine, and which of those credentials reach production?
- 2
Which actions does it take without asking, and who can change that setting?
- 3
Can an administrator set the policy centrally, and can a user override it?
- 4
Where are its session logs, how long are they kept, and do they hold secrets?
- 5
How does the vendor publish security advisories, and how fast do fixes ship?
- 6
Which MCP servers and extensions will it be allowed to use, and who approves new ones?
Where Excellent fits
Excellent runs beside the AI agents your engineers already use and checks what they did. The free scan reads supported agents’ session logs on a Mac and reports force pushes, deletions in folders you mark as never-delete and keys that ended up in a log, after the fact. With Pro, Excellent adds a live check that can ask or block before supported risky actions; coverage varies by agent and action. It produces the session-level evidence for the Measure step. It does not replace credential scoping, branch protection or a vendor’s own fixes. Run the free scan · Roll Excellent out to a team · Excellent for companies



