feat(google_adk): add ADK-117, TypeScript FunctionTool writes to the filesystem - #96
Open
bradAGI wants to merge 1 commit into
Open
feat(google_adk): add ADK-117, TypeScript FunctionTool writes to the filesystem#96bradAGI wants to merge 1 commit into
bradAGI 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.