fix(exec): ignore URL segments in workspace guard#1384
fix(exec): ignore URL segments in workspace guard#1384Alix-007 wants to merge 6 commits intosipeed:mainfrom
Conversation
|
Follow-up update: I pushed a small forward-only commit that keeps the path-boundary guard while moving it out of the current merge hotspot in |
|
Pushed a follow-up that aligns the URL guard changes with current upstream/main while keeping the path-boundary check as the only extra behavior. Local go test ./pkg/tools -run TestShellTool_GuardCommand_ -count=1 passed, and a local merge probe against upstream/main now merges cleanly. |
|
Addressed the current red CI items on this PR. This follow-up keeps ile:// URIs inside the workspace guard after the URL-path refactor, fails closed on cross-volume absolute paths, and reshapes the long absolute-path assertion so golines stays clean. Local verification on the branch: go test ./pkg/tools -run TestShellTool_GuardCommand_IgnoresURLPathSegments -count=1, go test ./pkg/tools -run TestShellTool_GuardCommand_BlocksAbsolutePathOutsideWorkspace -count=1, and golangci-lint run --new-from-rev HEAD~1 ./pkg/tools/.... I also ran a merge probe against the latest upstream main and the merged tree passed TestShellTool_FileURISandboxing, TestShellTool_URLBypassPrevented, and TestShellTool_GuardCommand_IgnoresURLPathSegments locally. |
|
Closing this one for now because the remaining path is blocked by GitHub permissions, not by the code change itself. I already resolved the current shell/url guard regressions locally, verified the key tests against the latest upstream main, and produced a merge result that would clear the dirty state. GitHub then rejected the push because updating this branch now also updates .github/workflows/nightly.yml, and the available PAT does not have workflow scope. Reopening or recreating this contribution makes sense once workflow-capable credentials are available. |
|
Closing per current contribution constraints: the remaining push is blocked by missing workflow scope on the available credential, so this PR cannot be finished from here without stronger GitHub permissions. |
Fixes #1042.
Summary
Testing