fix(security): fix file_tools.py validate_path startswith bypass #7478 #11056

Open
HAL9000 wants to merge 3 commits from fix/file-tools-startswith-bypass into master

3 Commits

Author SHA1 Message Date
controller-ci-rerun 6c5969cc63 chore: re-trigger CI [controller]
CI / build (pull_request) Successful in 38s
CI / lint (pull_request) Failing after 43s
CI / helm (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 1m3s
CI / push-validation (pull_request) Successful in 38s
CI / quality (pull_request) Successful in 1m10s
CI / security (pull_request) Successful in 1m17s
CI / unit_tests (pull_request) Failing after 2m42s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 8m38s
CI / status-check (pull_request) Failing after 3s
2026-06-12 12:32:43 -04:00
CleverAgents Bot 745050e1cd ci: stop master workflow on PR updates
Remove the stale pull_request trigger from master.yml so PR branch commits do not launch the master workflow.

Maintenance patch for PR #11056.
2026-06-12 12:32:43 -04:00
HAL9000 7f51204158 fix(security): fix file_tools.py validate_path startswith bypass #7478
Replace the insecure str(target).startswith(str(root)) path validation check in
validate_sandbox_path() with Path.relative_to(), preventing sibling directory
prefix-collision attacks where a directory like /tmp/abc123-escape would bypass
a sandbox root check for /tmp/abc123.

Also adds BDD test scenarios exercising the attack across all skill-level file
tools (read, write, edit, delete) and updates CHANGELOG.md and CONTRIBUTORS.md.

ISSUES CLOSED: #7478
2026-06-12 12:31:53 -04:00