Est.
FeaturesLong read

Code Access Security in Agentic AI vs Traditional Application Proxies

Agents need permission checks at execution time, not just network access.

· 8 min read
Cover illustration for “Code Access Security in Agentic AI vs Traditional Application Proxies”
Features · October 27, 2026 · 8 min read · 1,878 words

Code access security for agentic AI is not the same problem as securing traffic through a traditional application proxy. A proxy checks who can reach a service. An agent control must also judge what the agent is about to do, against the task that authorized it, before execution. Enforcement differs in where it happens and what it can see.

Why traditional application proxies enforce the wrong thing for AI agents

API gateways, reverse proxies, and web application firewalls were built around predictable software behavior. Their core controls establish identity and routing, deciding who made a call and which service should receive it. That model assumes the caller follows a known execution path and the request expresses enough of its purpose to govern access. The request is the unit of control. Once the identity and destination meet the policy's rules, the proxy has done its job.

An AI agent breaks that assumption because a goal does not prescribe a fixed sequence of actions. Bessemer's 2026 CISO primer explains that the same goal, model, and toolset can produce different action sequences across runs. A tool call therefore reveals only part of the story. Its purpose also depends on conversation history, planning state, and influences that reached the model before it chose the action. The same database access can be used for different goals.

That distinction separates permission to connect from permission to act. An agent account may hold valid access to a customer database, but those credentials do not establish whether a particular retrieval serves the user's task. A network control can know who made the call without knowing how they chose that query. The inability of even better identity checks to show how that choice was made is a gap in proxy design. The tool was not built for this actor type.

How agents expand what "access" means beyond what a proxy can track

Agents execute code, modify databases, invoke APIs, retain memory, and coordinate sub-agents. They can chain those operations across sessions. Access becomes a stateful workflow. An action in one system can shape later actions elsewhere, so the scope of a mistake is not confined to the first service reached.

Coding agents concentrate this exposure in sensitive infrastructure. Their connections to source-control platforms, CI/CD pipelines, and cloud APIs can include read/write access to repositories and deployment keys. Bessemer's primer describes how agents accumulate entitlements as they take on more tasks. Each new credential lets the agent reach more. The resulting identity may be valid at every boundary while holding more authority than its current purpose requires.

Existing Privileged Access Management and Identity Governance tools address only part of that problem. They partially cover agent identity but lack coverage of the LLM prompt layer, visibility into MCP tool invocations, and behavioral baselines for multi-step action sequences. Gravitee's State of AI Agent Security 2026 reports that the number of agents in enterprises roughly doubled in a single quarter while security coverage barely changed. The number of unmonitored agents is growing as their reach expands.

The MCP layer as the clearest proof that proxy-level enforcement fails

The Model Context Protocol, or MCP, makes this architectural weakness concrete. It has become the primary tool-access layer for AI agents, connecting their decisions to executable capabilities. Its STDIO transport SDK passes configuration-supplied commands to the operating system without sanitization or validation that they constitute a valid MCP server. An attacker who can influence that configuration can gain remote code execution on the host. A network boundary is not the execution checkpoint.

CSA's July 2026 security note documents another part of the exposure. Leading developer IDEs, including Cursor, Claude Code, Gemini CLI, GitHub Copilot, and Amazon Q, auto-execute project-defined MCP servers with developer-level operating-system privileges and no process isolation. The command inherits the developer's reach. This is not merely a question of whether an external API accepts the right token, because the consequential decision is whether a project-defined process should run at all.

Remote MCP services add a separate access weakness. A 2026 measurement found that a large share of internet-reachable servers exposed tools without authentication, leaving an open tools/call endpoint. Tool-poisoning tests on live servers also often succeeded against flagship reasoning models across the tools tested. Valid-looking traffic can still serve an attacker. OWASP's Top 10 for Agentic Applications (2026) documents an npm package impersonating the Postmark email service that secretly sent copies of outgoing emails to an attacker-controlled address, while the traffic looked valid from the network's perspective.

Encryption provides the starkest example of the inspection limit. Malicious instructions can travel as AES-256-GCM ciphertext with a key derived at runtime, leaving input filters with meaningless bytes to inspect. The model then decrypts the payload inside its own code execution runtime. The plaintext arrives as trusted code output. At the wire, the malicious instruction is invisible by design.

What "intent-aware enforcement" means architecturally and why placement before execution is the key distinction

The alternative is a control at the point where an agent's decision becomes an action. It evaluates the proposed operation against the task and current context before allowing execution. Timing is part of the security property. An alert after a database change does not authorize that change, and a check on an earlier prompt does not establish permission for every later tool call.

That requires interception throughout the agent's execution path. Relevant checkpoints include input receipt, tool initiation, the planning-to-execution transition, memory storage, code execution, and sub-agent invocation. The Agent Control Standard, or ACS, proposes standardized middleware hooks at these checkpoints, with policy decisions that allow, deny, or modify an action before it reaches production systems. ACS launched at the AI Agent Security Summit in San Francisco on May 27, 2026. Its maturity needs a clear qualification. It is in public preview, with a reference implementation still roadmapped.

A benign-looking model input can cause a data-moving tool action, so inspecting either channel alone misses the relationship between authorization and effect. OWASP ranks prompt injection as LLM01 and excessive agency as LLM06. Checking only prompts or only tools does not cover both. Google's 2025 secure AI agents paper extends least privilege accordingly, requiring permissions to align dynamically with the agent's specific purpose and current user intent.

The Open Agent Passport paper supplies a measured example. Its adversarial testbed found high social-engineering success against the model under a permissive policy. Under a restrictive pre-action policy, a similar group of attackers had a zero-percent success rate across hundreds of attempts. That result is specific to the testbed. Its significance is the separation it demonstrates between persuading a model and obtaining permission to execute an action.

Why retrofitting proxies with prompt inspection does not close the gap

Adding prompt inspection and rate-limiting to an API gateway is a reasonable response to new traffic risks. Those controls can help with traffic risks, but agent authorization needs more. The location of enforcement still limits the view. A gateway's view is limited to what crosses its boundary, so later context in which the agent retrieves a memory, changes a plan, or chooses a tool may fall outside that view.

Memory poisoning exposes that limit across time. An agent can browse attacker-controlled content, store hidden HTML text as trusted long-term memory, and retrieve it in an unrelated session weeks later. Research described in the brief found that a screening pipeline caught 83% of indirect prompt injection attempts but none of a tested set of poisoned memories. Distinguishing a false claim from a true one required knowledge the text itself did not contain.

The Open Agent Passport preprint points to a related weakness in depending on model alignment and post-hoc evaluation. Alignment is probabilistic, while retrospective evaluation examines behavior after the fact. Neither provides deterministic, policy-based authorization for individual tool calls. But hard policies can break legitimate workflows that run over a long horizon. Dynamic policy can allow, deny, or modify an action using current task context.

This changes the organizational requirement as well as the technology. Ambiguous security prompts and end-user judgment cannot substitute for a hardened control layer when agent behavior exceeds what typical developers can assess. Recent sandboxing research argues for prebuilt enforcement integrated through simple API calls. Proxies remain useful for identity and routing.

How organizations are building intent-aware enforcement in practice today

Coverage starts with the application layer, where the agent orchestrates tasks, manages state, and decides when to act. Agent discovery, agent security posture management, or Agent-SPM, and approval gates provide controls at that layer. Controls at the model layer govern how instructions are handled through prompt injection defense and LLM security controls. A system that understands instructions still needs controls over the operations those instructions produce.

The tools and MCP layer governs which APIs, connectors, tools, and servers the agent can reach. It requires MCP security, tool governance, and runtime enforcement. The data layer addresses what the agent can retrieve, remember, upload, or act on through data protection, retrieval-augmented generation and memory security, and indirect injection defense. Coverage depends on all four layers. A strong control at one does not establish protection at the others.

Salesforce Agentforce illustrates how some of these controls are taking operational form inside platforms. Its low-code Agent Builder provides managed guardrails for off-topic or hallucinated responses, while field-level security supports CRM automation workflows. Its scope also has a specific limit. LLM data masking is disabled for Agentforce agents, so the presence of managed guardrails should not be read as coverage of every data-control requirement.

Bessemer's primer organizes the operational work into visibility, configuration, and runtime protection. Visibility establishes which agents exist and what they can reach. Configuration reduces the scope of possible damage through least-privilege policies and identity assignment. Runtime protection detects and responds at machine speed, before or as an action executes. The sequence is deliberate. Enforcement cannot reliably govern an estate that has not been discovered or assigned clear access boundaries.

Under adaptive governance, agents start in assisted mode and can act more on their own when logs show stable precision, low false-positive rates, and behavior that can be controlled. Automated red teaming sends exploits to policy engines so guardrails can change before the next software release. Standards work is advancing in parallel. The Linux Foundation and OpenID Foundation jointly adopted SAFE-MCP in late 2025, and NIST announced its AI Agent Standards Initiative on February 17, 2026. OWASP's December 2025 agentic Top 10 extends, rather than replaces, its LLM risk taxonomy.

Why governance placed at the center of agent infrastructure produces faster deployment, not slower

Without clear access controls, teams must review decisions about production by hand again and again. Centralized identity, enforcement at execution checkpoints, and continuous visibility give new agents a governed path instead of forcing security teams to start from scratch. Uncertainty is the bottleneck. A governed route to useful tools also reduces the incentive for shadow AI, while outright MCP bans push adoption out of view. An unregistered server leaves an identity the organization cannot account for.

Organizations report rising confidence even as monitoring coverage, accountability structures, and pre-deployment controls barely move. The faster path is to establish the control layer before scaling the agent estate, so production approval rests on known permissions and enforceable action boundaries. Governance becomes an advantage when it gives security teams a sound basis to say yes.

Sources

  1. Before the Tool Call: Deterministic Pre-Action Authorization ...

More in Features