feat(google_adk): add ADK-117, TypeScript FunctionTool writes to the filesystem - #96
feat(google_adk): add ADK-117, TypeScript FunctionTool writes to the filesystem#96bradAGI wants to merge 1 commit into
Conversation
…filesystem ADK-004 covers the Python path-safety case; the TypeScript half was missing. Mirrors CSDK-012, including its coarse-signal caveat — it flags any filesystem write rather than only unnormalized paths, because TS path-normalization analysis is not yet wired. The callback gate does not close this by default: ADK-102 and ADK-107 are about before_tool_callback being present at all, and a callback that is present still has to inspect the path itself and know which root is allowed. Being wired up is not the same as containing anything. Agent composition widens the reach too — any branch listing this tool can reach it, and a write performed in one branch is visible to every agent reading the shared session state afterward, so the fix belongs inside the tool.
|
Thanks @bradAGI, this is a well built rule. Mirroring One change before this lands. The README documents the ID blocks as Not a request on you: a new rule also needs a rationale doc in |
ADK-004 covers the Python path-safety case; the TypeScript half was missing. Mirrors CSDK-012 — the TS half of the Claude SDK pair — including its coarse-signal caveat, stated in the explanation so the finding is honest about itself: it flags any filesystem write, not only unnormalized paths, because TS path-normalization analysis isn't wired yet. Confidence 0.5 to match.
The callback gate doesn't close this, and that's the mitigation an ADK author would reach for. ADK-102 and ADK-107 check that
before_tool_callbackis present at all — a callback that exists still has to inspect the path itself and know which root is allowed. Being wired up isn't the same as containing anything, so "we have a before_tool_callback" isn't an answer to this finding.Agent composition widens the reach: any branch of the tree that lists this tool can reach it, and a write performed in one branch is visible to every agent that reads the shared session state afterward. That's why the fix puts the check inside the tool rather than in a callback — it then holds for every agent in the tree that lists it, instead of only the ones whose callback was configured.
Verification — engine built at
main:Fire (
writeFileSync(notePath, body)in anew FunctionTool({ ..., execute })handler):ADK-117, ADK-201Silent (server-derived id, no model-supplied path):
ADK-201(ADK-201 is the pre-existing missing-AGENTS.md repo rule.)
Numbered ADK-117 to avoid ADK-111 in the open PR #51 and the IDs used by my other open PRs (#79, #86, #89).
No new predicates, so no
schema_versionbump.