Proxy settings break down because they rely on cooperative behaviour from the same process they are supposed to constrain. An agent can clear environment variables, spawn subprocesses, or use transports that never consult the proxy. If the runtime can choose its own path, policy is not enforcement, and the control fails at the moment of bypass.
Why proxy settings fail as an enforcement boundary for agent egress
Proxy configuration is a routing hint, not a hard security boundary. If the same runtime can edit its own environment, start child processes, open direct sockets, or select a transport that bypasses the proxy stack, the policy becomes optional. That means the control only works when the agent voluntarily follows it, which is the wrong trust model for egress control.
This is why proxy-only designs often look effective in testing and then fail under real workload behaviour. A determined or simply buggy agent can keep operating while ignoring the intended path, so the control gives you the appearance of restriction without reliable enforcement.
What bypass paths make proxy-only control brittle?
Common bypass paths are operational, not exotic. Environment variables can be cleared or overridden, subprocesses can inherit different settings, and libraries may use direct HTTP, raw TCP, WebSocket, gRPC, or other transports that never consult the proxy. If the agent can choose between multiple network paths, the proxy is just one option among several, not the policy decision point.
That matters because egress control is only meaningful when the enforcement point sits outside the subject being constrained. A control embedded inside the same process, configuration, or library chain it is meant to constrain can be sidestepped by design changes, dependency behaviour, or simple code paths that were not accounted for in the initial test.
For broader agent governance, the practical concern is whether the agent can reach anything you did not intend, not whether the proxy is configured correctly on paper. NHIMG’s Zero Trust for AI Agents frames this as verify the principal and request, then remove standing privilege so network access is not self-selected by the agent.
What should replace proxy-only egress control for AI agents?
Use the proxy as one layer, not the control plane. Stronger designs put enforcement at the network boundary, attach policy to identity and workload context, and limit what the agent can do even when it can initiate connections. That usually means deny-by-default egress, explicit allowlists, per-action authorization, and containment that does not depend on the agent preserving its own configuration.
For agents that legitimately need outbound connectivity, the safer pattern is to make the approved destination and permitted action explicit at the policy layer rather than implicit in local settings. NHIMG’s AI Agent Authorisation Guide is the right companion here because it treats access as task-scoped and per-action, instead of assuming the runtime will police itself.
That same principle applies when agent identity is part of the design. If the agent can present credentials or tokens to services directly, then egress control and authorization need to work together, not separately. The Agentic AI Identity Guide is useful for understanding how delegation, registration, authentication, and retirement shape the real enforcement surface.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST Zero Trust (SP 800-207) sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agent egress bypass is a privilege and control-abuse problem. |
| ASI02 — Tool Misuse | Alternate transports and child processes let the agent use tools outside intended controls. | |
| Recommendation — Constrain agent network actions with per-request authorization and explicit trust boundaries. Restrict which tools and transports the agent may invoke for outbound access. | ||
| NIST Zero Trust (SP 800-207) | PR.AA-05 — Policy Enforcement Point | Proxy-only egress fails when enforcement is inside the controlled runtime. |
| Recommendation — Place egress enforcement outside the agent so policy cannot be bypassed locally. | ||
| OWASP Non-Human Identity Top 10 | NHI-05 — Overprivileged NHI | An agent that can ignore proxy policy has more egress power than intended. |
| NHI-06 — Insecure Cloud Deployment Configurations | Proxy reliance often leaves cloud and runtime paths open to direct egress. | |
| Recommendation — Reduce agent network reach to the minimum destinations and actions required. Harden runtime and network settings so direct outbound paths are denied by default. | ||
Practitioner Guidance
What to verify: Confirm whether the agent can still make outbound connections when proxy variables are removed, altered, or ignored. Test the actual runtime paths, not just the intended deployment configuration, because bypass through alternate transports or child processes is the failure mode that matters most.
Decision rule: If the agent can select its own network path, treat proxy settings as a convenience control and not as a policy control. Put blocking and approval at a boundary the agent cannot rewrite, then use the proxy only as supporting telemetry or routing enforcement.
Common mistake: Teams often validate proxy enforcement from the shell or container layer and assume the agent will behave the same way in production. That misses the key question, which is whether the runtime, dependencies, or plugins can originate traffic independently of the configured proxy.
Practitioner takeaway: The moment an agent can bypass its own proxy settings, you no longer have control of egress, you only have an expectation of compliance.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 23, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org