Repository navigation
adk-ifc-guard: taint-tracking plugin for ADK sub-agent handoffs #8462
Replies: 3 comments
|
Nice idea. Carrying taint across the handoff is the part most guards miss. On your question, BasePlugin plus session state seems like the right layer to me, with two things I'd test:
For a regression suite, record a few attack runs (untrusted page → handoff → sensitive tool) and judge the traces, so the result doesn't depend on a model each time. Disclosure: I work on AiEnsured agentest, an Agentic AI Testing platform. It does that offline from ADK runs. Label the attack runs as injection inputs and pass your tools list, and the injection and tool-allowlist checks judge them. ADK walkthrough on main: https://github.com/srpadmanabhuni/agentest/blob/main/docs/integrations/google-adk.md https://pypi.org/project/agentest-ai/ If you try it against your 20 test cases, I'd be curious what it agrees with and what it misses. |
|
Thanks for taking a look, Dr. Padmanabhuni — both of those are really good catches. Right now I only verify the HMAC at the handoff boundary, so if a tool or sub-agent overwrites that state key mid-session, it could clear the taint. Making the taint ledger append-only and checking the signature on every tool call read makes a lot more sense. Same with the post-block response — I hadn't tested for the model still claiming "Done, deployed" after a tool gets blocked. Checking the final model output against blocked tool receipts in I'll try running |
|
Hi @srpadmanabhuni (Dr. Padmanabhuni), quick follow-up — I implemented and tested both points you raised on Google ADK 2.15.1 with a deterministic scripted model (now at commit
Traces & |
Uh oh!
There was an error while loading. Please reload this page.
Hi ADK team,
I built a small open-source plugin called adk-ifc-guard, entirely on my phone.
The idea: if an agent reads untrusted content (a web page, an email, an MCP tool output) and then hands work to a sub-agent, the sub-agent may not know that content was untrusted. This plugin carries an HMAC-signed taint token across the handoff and blocks sensitive tools (deploy, bash, email) once the session is tainted. It also decodes Base64, Hex and hidden Unicode TAG characters before checking.
It has zero dependencies and 20 tests pass, including forged-token and symlink-escape cases.
Repo: https://github.com/Nikhilbharti284/adk-ifc-guard
I'd really appreciate feedback on whether the BasePlugin + state-based propagation approach makes sense. Thanks!

All reactions