AI Agent Security: Who Owns the Risk When Agents Act?

AI agent security gap between harness, MCP server and GitHub in one workflow

AI agent security has a gap that no vendor claims. Five organizations have published guidance on who is responsible when an agent acts: Microsoft, the Cloud Security Alliance, CoSAI, AWS (for AgentCore) and Anthropic. Only two assign ownership of an agent’s identity, and they split it differently. None agree on who answers for the agent’s behavior.

Cloud security solved a version of this problem years ago. The AWS shared responsibility model separates what the provider secures from what the customer does with it. Agents don’t fit that split cleanly, because they sit between a person and a request, and they aren’t deterministic.

Why the cloud model doesn’t carry over

Frontier labs are clear about what they own: hardening models, adding guardrails and making hijacking difficult. They also admit a limit: a lab can’t see why an action happens in a company. If an agent deletes files from Google Drive, that could be an attack or routine housekeeping, and the lab has no way to know.

The agent also sends authenticated, authorized requests. That’s what makes a compromised or rogue agent hard to spot. Think of a human mistake, except the actor isn’t human and the action isn’t necessarily a mistake.

A poisoned ticket as a test case

Imagine a coding agent pulling a support ticket via an MCP server. Hidden in the ticket are hostile instructions, so the agent commits a change to GitHub with the developer’s own token. Whose job was it to stop that?

The scenario isn’t far-fetched. One security vendor’s monitoring found that in a single month, 60% of Claude Code and Desktop agents contacted at least two outside vendors, and 47% contacted at least three.

  • The agent runner (the software running the agent) sees the most. Claude Code runs a server-side probe on incoming tool results and, in auto mode, uses a separate classifier to block actions that look driven by hostile content. OpenAI, Cursor and GitHub have their own approval prompts, reviewers, network limits and sandboxes. Yet the usage terms put responsibility on the user.
  • MCP hands the job back to the client. The spec says clients should validate tool results and that a human should be able to deny tool calls. It doesn’t mention prompt injection, treats client information as self-reported, and says MCP can’t enforce these principles at the protocol level. A typical server verifies the sender, and doesn’t judge whether the request ought to exist.
  • GitHub receives a valid token. Unless an admin set a branch protection rule on main, nothing stops the push, and those rules by default don’t apply to repository admins. Its terms say users are responsible for activity under their account.

Agent identities help, but the risk still lands on the user

Giving each agent its own identity should mean narrower, shorter-lived access. Microsoft does this with Entra agent identities, which are service principals in a tenant, and marks per-action authorization as shared.

When an agent acts for a user, though, Microsoft’s own documentation assigns risky activity to the user. Conditional Access rules written for an agent identity leave out requests the agent makes on the user’s behalf. Within a single vendor, the framework says shared and the product says you.

Why identity is the common thread

No vendor in the chain sees the whole agent. Each sees a slice: the instruction for the agent runner, a token for the MCP server, and a developer pushing code for GitHub. Coding agents usually run under the developer’s credentials, so their actions look like the developer’s own.

One thing spans all three: the identity the agent uses. A single owner can set scope, expiry and revocation there. Branch protection and allowlists add safety, with identity as the thread connecting them.

What security teams can do now

  1. Inventory every agent and its credentials across vendors.
  2. Give each agent a dedicated identity with narrow, temporary access.
  3. Decide where the log trail for agent decisions and actions will live.
  4. Enable branch protection, read-only modes, tool allowlists and similar controls.
  5. Build a revocation path and rehearse cutting an agent’s access across all vendors.
  6. Ask each vendor what it can reveal about an agent that works across other services too.

No company can pass accountability for an agent to its model provider, and a valid login says nothing about intent. What it can do is name an owner, restrict access, join up logs across systems and practice stopping the agent. Until the frameworks converge, those steps are what make agent adoption governable.

Source: BleepingComputer

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.