Skip to content
Discussion options

You must be logged in to vote

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_email call 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.

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 ToolApprovalRequiredError and reuses th…

Replies: 1 comment

Comment options

thegdsks
Oct 17, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by thegdsks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant