mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 18:25:26 -04:00
fix(tools): strict path confinement with sensitive-subpath deny list (#1072)
Rework read_file / write_file confinement after review feedback: - Remove $HOME from default allow roots. Only project data/ and system temp dirs are allowed out of the box. - Add a sensitive-subpath deny list (.ssh, .gnupg, shell rc files, .env, .netrc, SSH key filenames). Checked BEFORE allowlist so it blocks even when a broader root is configured. - Add "tool_path_extra_roots" setting for opt-in broader access. - Sensitive subpaths remain blocked regardless of configured roots. Tests: 24 cases covering /etc/shadow, ~/.ssh/authorized_keys, symlink into .ssh, traversal, shell rc files, key filenames, extra roots, and dispatch-level end-to-end.
This commit is contained in:
@@ -97,6 +97,11 @@ DEFAULT_SETTINGS = {
|
||||
"agent_max_tool_calls": 0,
|
||||
"agent_input_token_budget": 6000,
|
||||
"agent_stream_timeout_seconds": 300,
|
||||
# Extra directory roots that read_file / write_file may access, in
|
||||
# addition to the built-in project data/ and system temp dirs. Each
|
||||
# entry is an absolute path. Sensitive subpaths (.ssh, .gnupg, shell
|
||||
# rc files, SSH key files) are always blocked regardless of roots.
|
||||
"tool_path_extra_roots": [],
|
||||
"task_endpoint_id": "",
|
||||
"task_model": "",
|
||||
"default_endpoint_id": "",
|
||||
|
||||
Reference in New Issue
Block a user