Skip to content

fix: keep builder file operations under project root#5790

Closed
maxts0gt wants to merge 2 commits into
google:mainfrom
maxts0gt:codex/adk-target4-audit
Closed

fix: keep builder file operations under project root#5790
maxts0gt wants to merge 2 commits into
google:mainfrom
maxts0gt:codex/adk-target4-audit

Conversation

@maxts0gt

Copy link
Copy Markdown

Summary

  • resolve Agent Builder file paths against the session project root
  • reject absolute, parent-directory, and symlink paths that escape that root
  • add regression coverage for read/write/delete file tools refusing outside paths

Tests

  • uv run --with pytest --with pytest-asyncio pytest tests/unittests/cli/built_in_agents/test_builder_file_paths.py
  • uv run --with pyink pyink --check src/google/adk/cli/built_in_agents/utils/resolve_root_directory.py tests/unittests/cli/built_in_agents/test_builder_file_paths.py

@adk-bot adk-bot added the tools [Component] This issue is related to tools label May 21, 2026
@rohityan rohityan self-assigned this May 26, 2026
@rohityan rohityan added the request clarification [Status] The maintainer need clarification or more information from the author label May 26, 2026
@rohityan

rohityan commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Hi @maxts0gt , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Please fix formatting errors.

@DeanChensj

Copy link
Copy Markdown
Collaborator

Thanks @maxts0gt for the great PR! This issue has been resolved in 1fa7cda, so I'm going to close this for now. You are more than welcome to contribute in the future!

@DeanChensj DeanChensj closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

request clarification [Status] The maintainer need clarification or more information from the author tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants