Skip to content

feat(google_adk): add ADK-117, TypeScript FunctionTool writes to the filesystem - #96

Open
bradAGI wants to merge 1 commit into
trustabl:mainfrom
bradAGI:feat/adk-ts-path-safety
Open

feat(google_adk): add ADK-117, TypeScript FunctionTool writes to the filesystem#96
bradAGI wants to merge 1 commit into
trustabl:mainfrom
bradAGI:feat/adk-ts-path-safety

Conversation

@bradAGI

@bradAGI bradAGI commented Aug 24, 2026

Copy link
Copy Markdown

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_callback is 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:

$ trustabl rules validate .
OK: 85 rule pack(s), 207 rule(s) valid under rule schema version 14

Fire (writeFileSync(notePath, body) in a new FunctionTool({ ..., execute }) handler): ADK-117, ADK-201
Silent (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_version bump.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant