Repository navigation
ToolBoundary v1.1.0
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
GatewayRuleyou 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:buildDeployment 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_modenow raisesFutureWarning. It still falls back toREAD_ONLY, andaccess_modewill be required in 2.0. strict_limits=Truenow also requires a value when a tool has only amin_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_approvalcall 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 toolboundaryFull details are in the changelog.