Repository navigation
fix(desktop): browse SSH-backed workspaces remotely - #99538
Conversation
Well-hardened SSH filesystem adapter. Injection safety is handled consistently: all remote paths go through Non-blocking:
Verdict: LGTM |
|
One detail in the current review may be worth revisiting before merge. In the SSH branch of data, _size, target = await asyncio.to_thread(
backend.read_bytes,
path,
max_bytes=_FS_TEXT_SOURCE_MAX_BYTES,
)
I also noticed two related SSH-download differences from the local path:
There also appears to be a sensitive-path symlink case worth a regression test: Suggested focused tests:
The |
|
Addressed in 08e8322f1d. SSH downloads now resolve the remote regular-file target before applying the sensitive-path policy, so a benignly named symlink resolving to a sensitive target is denied before content transfer. Authorized downloads are streamed in chunks rather than buffered or constrained by the text-preview source cap. Tests: |
08e8322 to
b2ddc0e
Compare
|
Rebased onto current main in b2ddc0ea31 and retained the requested safety boundary in the extracted files router: the SSH download resolves the real remote target before the sensitive-path check, then streams only an authorized file without a preview-size cap. Verified locally: 28 passed, 5 skipped across SSH workspace, files-router, and SSH environment tests. |
b2ddc0e to
97ee411
Compare
Route remote workspace filesystem operations through the extracted files router without starting agent-file synchronization. Resolve SSH download targets before applying sensitive-path policy and stream authorized files without buffering or preview-size limits. Tests: python -m pytest tests/hermes_cli/test_web_server_fs.py tests/hermes_cli/test_ssh_workspace_fs.py tests/tools/test_ssh_environment.py -q. Original implementation authored by fangliquanflq.
97ee411 to
3a10dda
Compare
Fixes #98056
Summary
Tests
scripts/run_tests.sh tests/hermes_cli/test_web_server_fs.py tests/hermes_cli/test_ssh_workspace_fs.py tests/tools/test_ssh_environment.py tests/tools/test_ssh_bulk_upload.py tests/tools/test_sync_back_backends.py -q