Skip to content

ToolBoundary v1.1.0

Choose a tag to compare

@Jaycubic Jaycubic released this 10 Nov 11:50
· 5 commits to main since this release

ToolBoundary v1.1.0

Release type: Security feature

This release adds a policy gateway that protects your tools from a compromised agent by running policy outside the agent's process.

Policy gateway

In-process checks stop mistakes and misbehaving model output, but code running in the agent's process can get around them. toolboundary.gateway moves policy out of that process.

  • Agents can't approve themselves: the policy runs in the gateway, and the agent holds only an identity key.
  • Deny by default: a request must match a GatewayRule you wrote.
  • Limits come from the real request: value and record count are read from the bytes being forwarded, not from what the agent claims.
  • Credentials stay out of the agent: the gateway adds them when it forwards a request.
  • Ambiguous requests are refused: this covers duplicate JSON keys, encoded path tricks, method-override headers and unlisted query parameters.

Run it in its own process:

python -m toolboundary.gateway --app policy_app:build

Deployment requirements

The gateway only protects you when all of these are true:

  • It runs as a different OS user or in a different container from the agent.
  • The agent has no direct network route to the tools.
  • The agent doesn't hold the tools' credentials.

See the gateway guide for setup.

Other changes

  • Guarding a tool without access_mode now raises FutureWarning. It still falls back to READ_ONLY, and access_mode will be required in 2.0.
  • strict_limits=True now also requires a value when a tool has only a min_value.
  • The docs now say plainly that token request binding stops a request being changed after approval, but doesn't stop a compromised caller declaring a false value.

Known limitations

  • A prompt-injected agent can still do anything its rules allow, so keep rules narrow and limits low.
  • A requires_approval call through the gateway is denied, and there's no built-in way to resume it after a person approves.
  • The gateway covers HTTP tools only, and it doesn't inspect responses.

Closes #25. #26 stays open until access_mode becomes required.

Install

pip install --upgrade toolboundary

Full details are in the changelog.