hermes-agent/tools
Teknium 021a076880 fix(file-ops): prevent non-UTF-8 corruption and symlink data-loss
Two DATA-LOSS bugs in ShellFileOperations found in a core-tools audit,
each reproduced live against current main:

1. Non-UTF-8 file content silently corrupted on read->write. The terminal
   env decodes stdout with errors='replace', so a latin-1/8859 file's bytes
   arrive as U+FFFD before _is_likely_binary inspects them. U+FFFD is
   'printable', so the >30%-non-printable check never flagged it, and the
   agent would read the mojibake and write it back, permanently replacing the
   original bytes. Fix: treat a sample containing U+FFFD as binary (read-only).

2. Writing through a symlink destroyed the link and orphaned the target. The
   atomic temp-file + 'mv -f' swap replaced the symlink itself with a plain
   file; the real target was never updated. Fix: resolve the link with
   readlink -f/realpath first and recompute the temp dir from the resolved
   target so the mv stays same-filesystem atomic. Broken links fall back to
   the original path (no regression).

Both verified with sabotage-checked regression tests (fail without the fix).
Proper UTF-8 text (incl. non-ASCII) and plain-file writes are unaffected.
2026-08-01 15:39:33 -07:00
..
computer_use
environments feat(terminal): raise Docker sandbox /dev/shm to 1g by default (configurable) 2026-07-31 21:31:51 -07:00
neutts_samples
wakewords
__init__.py
ansi_strip.py
approval.py
async_delegation.py
audio_container.py
binary_extensions.py
blueprints.py
browser_camofox.py
browser_camofox_state.py
browser_cdp_tool.py
browser_dialog_tool.py
browser_supervisor.py
browser_tool.py
budget_config.py
checkpoint_manager.py
clarify_gateway.py
clarify_tool.py
close_terminal_tool.py
code_execution_tool.py
computer_use_tool.py
credential_files.py fix(vision): make desktop image uploads reachable from profile Docker sandboxes (#69575) (#75671) 2026-07-31 17:43:37 -04:00
cronjob_tools.py fix(cron): close GitHub auth-header exemption abuse in prompt scanner 2026-07-31 22:33:00 -07:00
daemon_pool.py
debug_helpers.py
delegate_tool.py fix(delegation): prevent child HERMES_SESSION_ID leak into parent process env 2026-07-31 22:32:55 -07:00
delegation_live_log.py
desktop_ui.py
discord_tool.py
env_passthrough.py
env_probe.py
fal_common.py
feishu_doc_tool.py
feishu_drive_tool.py
file_operations.py fix(file-ops): prevent non-UTF-8 corruption and symlink data-loss 2026-08-01 15:39:33 -07:00
file_state.py
file_tools.py fix(tools): dedup eviction task_id + workdir cwd leak 2026-08-01 15:38:57 -07:00
flux3_video_tool.py
focus_pane_tool.py
fuzzy_match.py
homeassistant_tool.py
hook_output_spill.py
image_generation_tool.py
image_source.py fix(vision): make desktop image uploads reachable from profile Docker sandboxes (#69575) (#75671) 2026-07-31 17:43:37 -04:00
interrupt.py
kanban_tools.py
lazy_deps.py fix(deps): repair Google transitive security floors (#72108) 2026-07-31 23:18:38 -07:00
managed_tool_gateway.py
mcp_dashboard_oauth.py
mcp_oauth.py
mcp_oauth_manager.py
mcp_stdio_watchdog.py
mcp_tool.py fix(mcp): guard against duplicate spawns and stale connecting entries (#58862) 2026-08-01 11:35:59 +05:30
memory_tool.py
microsoft_graph_auth.py
microsoft_graph_client.py
neutts_synth.py
open_preview_tool.py
openrouter_client.py
osv_check.py fix(security): cache OSV malware preflight verdicts and stop double component discovery (#75485) 2026-08-01 10:47:20 -07:00
patch_parser.py fix(patch): anchor V4A Begin/End Patch markers to full lines 2026-08-01 14:31:48 -07:00
path_security.py
process_registry.py fix(process): decode background process output with incremental UTF-8 decoders 2026-07-31 21:21:13 -07:00
project_tools.py
react_to_message_tool.py
read_extract.py
read_terminal_tool.py
registry.py
schema_sanitizer.py
send_message_tool.py
session_search_tool.py fix(sessions): keep kanban worker runs out of the session lists 2026-07-31 13:53:04 -05:00
skill_manager_tool.py
skill_provenance.py
skill_usage.py
skills_ast_audit.py
skills_guard.py fix(security): extend secret redaction to GitLab token families 2026-07-31 21:31:10 -07:00
skills_hub.py fix(skills-hub): include owner in ClawHub source URLs and add retry on 429 (#51236) 2026-07-31 22:33:11 -07:00
skills_sync.py
skills_sync_client.py
skills_tool.py
slash_confirm.py
terminal_tool.py fix(tools): dedup eviction task_id + workdir cwd leak 2026-08-01 15:38:57 -07:00
thread_context.py
threat_patterns.py
tirith_security.py
todo_tool.py
tool_backend_helpers.py
tool_output_limits.py
tool_result_storage.py
tool_search.py
transcription_tools.py
tts_streaming.py
tts_text_normalize.py
tts_tool.py
url_safety.py
video_generation_tool.py
vision_tools.py
voice_mode.py
wake_word.py
web_tools.py
website_policy.py
working_diff.py
write_approval.py
x_search_tool.py
xai_http.py
xai_video_tools.py
yuanbao_tools.py