Skip to content

fix(shell): skip git URLs in path-escape check - #741

Merged
delete-cloud merged 1 commit into
mainfrom
fix/bash-run-git-url-path-escape
Sep 8, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
fix/bash-run-git-url-path-escape

Conversation

@delete-cloud

Copy link
Copy Markdown
Owner

Summary

bash_run with sandbox_mode=none treated https://github.com/org/repo.git as filesystem path /github.com/org/repo.git and rejected git clone.

Skip argv tokens that are remote URLs (https://, http://, git+https://, git+http://, git+ssh://, ssh://, git://, and git@host:path). Other argv tokens still go through the path-escape check, so git clone <url> /outside remains blocked.

Tests

uv run pytest tests/tools/test_shell.py::TestShellTool -q

40 passed.

Local K3 + Grok re-review of aa5a1e90: both APPROVE, no remaining P0–P2.

Scope

  • coding-agent/src/coding_agent/tools/shell.py
  • coding-agent/tests/tools/test_shell.py

bash_run sandbox_mode=none treated https Git URLs as absolute paths and blocked clone.
@delete-cloud
delete-cloud force-pushed the fix/bash-run-git-url-path-escape branch from aa5a1e9 to d201e49 Compare September 8, 2026 14:02
@delete-cloud
delete-cloud merged commit c40a729 into main Sep 8, 2026
1 check passed
@delete-cloud
delete-cloud deleted the fix/bash-run-git-url-path-escape branch September 8, 2026 14:34
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