Repository navigation
|
My agent reads web pages and can call send_email. If hidden page text tells it to mail the customer list to an outside address, a normal permission check passes because the agent is allowed to send mail. |
Replies: 1 comment
|
Label where each tool argument came from, then write policy rules about which labels may reach which tools. That is the taint-aware tool guard. The policy: {
taint: {
rules: [
{
id: "mail-recipient",
resource: "tool:send_email",
args: { recipient: { forbid: ["untrusted_web", "tool_output:*"] } },
},
],
},
},
// ...
guardTool(theauth, { agentId, provenance: { recipient: ["untrusted_web"] } }, tool);A violation escalates by default: the guard throws Limits:
Docs: docs/taint-guard.mdx. |
Label where each tool argument came from, then write policy rules about which labels may reach which tools. That is the taint-aware tool guard. The
send_emailcall is well formed, so permissions alone cannot see the problem. What differs is that the recipient came from a fetched page, not from the user.A violation escalates by default: the guard throws
ToolApprovalRequiredErrorand reuses th…