Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#494·agenticSeek

[SECURITY]: Default bash execution path skips automatic unsafe-command detection

Author: rahulT-17Created Apr 29, 2026Updated Apr 29, 2026

Hi, thanks for the agenticSeek

I may be missing intended behavior, but I was able to reproduce that the automatic unsafe-command check does not run in the default bash execution path.

Summary

AgenticSeek's automatic unsafe command detection (is_any_unsafe) is never called during normal operation because safe_mode is hardcoded to False in the Tools base class and never set to True anywhere in the codebase.

What I verified:

  • sources/tools/tools.py initializes safe_mode to False.
  • sources/agents/agent.py calls tool.execute([block]) without passing a safety flag.
  • sources/tools/BashInterpreter.py only calls is_any_unsafe() when safe_mode is True.
  • sources/tools/safety.py also appears to have a malformed entry where route and --force are combined into one string.

Evidence

  • [tools.py:44] initializes [self.safe_mode = False]
  • [agent.py:274] calls [tool.execute([block])] without passing a safety flag for bash execution.
  • [BashInterpreter.py:46] only calls [is_any_unsafe()] when [self.safe_mode] is True.
  • [safety.py:4] has a missing comma after "route", which collapses two intended entries into "route--force".
  • I also verified this at runtime: with the default path, [is_any_unsafe()] was not called; after setting [safe_mode = True], it was called once.

Runtime proof:

  • With the default setting, is_any_unsafe() was not called.
  • After setting safe_mode = True, is_any_unsafe() was called once.
  • The unsafe command list currently contains route--force as a single entry.

Observed output:

after safe_mode=False calls: 0
after safe_mode=True calls: 1
['route--force']
False
False
False
False

Impact:

In the normal agent flow, bash commands can run without automatic unsafe-command filtering unless safe_mode is manually enabled.

If this is intended behavior, please let me know. If not, I’d be happy to open a PR with a fix and regression test.

Source: Fosowl/agenticSeek

View original on GitHubView discussion on GitHub