AgentApprovals
← All guides

Check whether your agent can bypass its approval gate

Map the tools, identities, and credentials that can reach one protected action. Use a worked MCP example and a downloadable approval boundary checklist.

Your agent asks permission to export a document. The approval service refuses because nobody has approved it. Good. But the agent also has a shell that can write to the same output folder. The intended tool stopped one request; the file is still within the agent’s reach.

Check every route to the effect you want to control. An approval gate covers the requests that pass through it. To make a stronger claim, you need evidence that the agent cannot reach the destination, approval state, or reviewer authority through another route.

Download the approval boundary checklist. It is an editable assessment worksheet with a worked example and a test plan. It does not scan your machine or install isolation.

Start with one protected effect

For our MCP export starter, write:

Only the service may create a file in the approved output directory, using the stored bytes of a proposal that passed review and the execution checks.

This is the boundary we want to assess. It is narrower than “the agent is safe” and easier to inspect. Saving a draft elsewhere is outside this boundary. Publishing that file is a separate effect and needs its own assessment.

For your project, replace the file operation with one concrete effect, such as sending a message from a particular account or deploying to a particular environment. Name the destination and the identity that can change it.

  1. Intended routeAgent → MCP tool → approval service → output file.
  2. Alternate route to checkAgent → shell with directory access → output file.
A denial on route A tells you nothing about route B until you inspect B's permissions and controls.

Follow the destination back to each source of authority

List the agent’s tools, shell access, filesystem mounts, logged-in browser sessions, and connected services that could reach this effect. Include delegated jobs if they can use a different identity. Record credential names and scopes, never their values.

Then ask two questions for each route:

  1. Can it produce the effect without the intended approval check?
  2. Can it change the approval decision, the checker, or the credentials that the checker relies on?

The second question catches a route that appears indirect. An agent might have no approval tool but still be able to run the reviewer’s local command or modify its database.

This applies OWASP’s recommendation to validate authorization on every relevant request to an agent workflow. Looking only at the advertised MCP tools leaves other access paths out of the assessment.

Worked example: the same-account starter

The starter’s quickstart runs under one owner’s OS account. Its documentation calls this a cooperative workflow. The following table assumes the agent has unrestricted shell and filesystem access as that same account. A host sandbox may change reachability; inspect the actual configuration before applying this conclusion to your session.

RouteAuthority it usesWhat checks it?Assessment under this assumption
MCP export tool → serviceRequest tokenService checks the stored proposal’s state and expiry before claiming executionChecked route; the token has no approval endpoint
Shell → reviewer CLIOwner account’s access to service stateLocal reviewer command can record a decisionAgent could exercise reviewer authority
Filesystem tool or shell → service database/codeOwner account’s write accessNo separate OS identity in the quickstartAgent could alter trusted state or enforcement code
Filesystem tool or shell → output directoryOwner account’s write accessFilesystem permissions, outside the proposal checkAgent could write outside the export route

These are conclusions from inspecting the starter’s source and documented setup, not results of a penetration test on your machine. The existing integration tests exercise the service route. They do not establish isolation from other tools in a coding-agent session.

The useful result is specific: under this assumption, the quickstart does not enforce approval against an agent that disregards its instructions. It still provides checks, a review workflow, and verified file export through the service.

Record evidence, not just a checkbox

Use these three outcomes in the worksheet:

  • Bypass identified. A reachable route can produce the effect or change its approval authority without the intended control. Record whether source/configuration inspection or an actual test supports that conclusion.
  • Blocked in this check. A specific route was denied in a recorded environment and identity. Keep the scope of the claim that narrow.
  • Unverified. Reachability or enforcement is unknown. Do not turn an untested route into a pass.

For each entry, save the identity, relevant configuration, date, expected result, observed result, and evidence location. Keep private infrastructure details in an access-controlled assessment. A redacted summary is enough for a public issue.

For example, “the MCP export call was denied while pending” is evidence about that call. “The agent cannot export without approval” requires evidence about the other routes too. If the destination remains writable by the agent, changing the prompt cannot remove that access.

Let the agent gather facts; keep authority in controls

An agent can help enumerate routes from a scoped tool list, redacted configuration, and source code. It can explain why a route may reach the effect and propose checks. Those are judgments for you to review, not permission to attempt an action.

Deterministic checks can inspect effective identities, configured access rules, and destination state. A controlled negative test can then observe whether one route is denied. Neither an agent’s confidence nor a passing test proves that you found every route.

OWASP’s Excessive Agency guidance recommends limiting available capabilities and enforcing authorization in downstream systems. For this example, a stronger design would keep the reviewer, service state, code, and output outside the agent’s access, while exposing only the checked request interface. The starter describes that separation but does not provision or verify it.

The worksheet gives the agent a bounded research prompt. It asks for evidence and unknowns without asking it to read secret values, approve its own work, or try a bypass.

Verify one route at a time in a disposable environment

After reviewing the inventory, have the owner authorize a test plan with exact routes, identities, dummy data, and expected effects. Use a separate test destination that reproduces the relevant access controls. A safe fixture does not prove production is configured the same way.

For each approved test:

  1. Record the configuration and destination state before the attempt. Confirm that no production credentials or publishing watchers are involved.
  2. Exercise one named route with the test identity. Record the result and inspect the destination independently; an error message alone does not prove nothing happened.
  3. Compare the result with the expected denial. If the action succeeded, stop and record a bypass. If the result is ambiguous, keep it unverified and investigate before retrying.
  4. After a control changes, repeat the relevant checks and update the inventory. Reassess when you add tools, credentials, identities, or destination access.

The download has fields for this plan and its results. It contains no bypass commands. We have not run this new assessment procedure against an isolated Codex or Claude Code deployment, and we make no claim that it proves either host secure.

Start by filling the route table for your existing setup. A known bypass tells you where access must change. An unverified route tells you what evidence is still missing. Both are more useful than treating a single approval prompt as proof of coverage.