Skip to content

Harden command execution and implement autonomous tool installation#4

Merged
yashab-cyber merged 20 commits into
yashab-cyber:mainfrom
JMAN730:main
Jun 23, 2026
Merged

Harden command execution and implement autonomous tool installation#4
yashab-cyber merged 20 commits into
yashab-cyber:mainfrom
JMAN730:main

Conversation

@JMAN730

@JMAN730 JMAN730 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

This branch brings in 20 commits spanning runner hardening, multi-provider key management, GUI improvements, and an autonomous tool-installation system.

🔒 Runner & security hardening

  • 99a3647 — Harden the runner: shell-free, consistent command execution (removes shell interpolation risk).
  • ab2107e — Enforce install-drivers-only via a runner bypass, preventing arbitrary install execution.
  • e51b1e3 — Document the enforced install-drivers-only mechanism (spec).

🔑 DeepSeek multi-key failover (PR #2)

  • 009b8aa — Add DeepSeek API key management.
  • f3280d7 — Merge multi-key failover support (rotates across keys on failure).

🖥️ GUI improvements (PR #3)

  • a7e6165 — Improve GUI agent auto-run behavior and sidebar collapse.
  • 5c05f14 — Merge the GUI auto-run / sidebar work.

📦 Autonomous tool installation (PR #4)

  • c16a358 / fab9f81 — Design doc + implementation plan for autonomous security-tool installation.
  • 59327a1 — Add TOOL_INSTALL_MAP, allow_arbitrary_install flag, and install drivers to config.
  • c82561eToolInstaller: package-manager detection and install planning.
  • 299fa9a — Execute installs via the runner and verify the binary resolves afterward.
  • a2e130d — Allowlist-bounded install action gated by safe_mode.
  • 98beff7 — Document the install action in the agent system prompt.
  • 3152bee — Add /install CLI command and hackbot install subcommand.

🧪 Tests & platform fixes (PR #5)

  • 75dfbc3 — Make runner tests pass on Windows.
  • Merge commits 032cb22, 8a930f8, 0b3bee9 integrate the above feature branches.

Base

  • 8f0a97eUpdate README.md (the shared starting point).

claude and others added 20 commits June 14, 2026 18:17
The agent runs LLM-generated commands via ToolRunner. Execution was
inconsistent across paths: POSIX sync used shlex.split (safe), but the
Windows sync path used shell=True (cmd.exe) and execute_async() used
create_subprocess_shell — both shell-injection surfaces. validate_command
only checked the first token against the allowlist and never rejected
shell operators or command substitution.

- execute(): use shell=False on all platforms. On Windows the raw string
  goes to CreateProcess (no cmd.exe), so metacharacters are not interpreted.
- execute_async(): replace create_subprocess_shell with create_subprocess_exec
  and bring it to parity with execute() (plugin interception, risky-command
  confirmation, output truncation, FileNotFoundError handling, logging,
  on_output) so it can never become a future footgun.
- validate_command(): reject command substitution ($(...), backticks) and
  standalone shell-operator tokens (; | || & && > >> < <<) via a token-based
  check that does not false-positive on URLs (& inside a quoted arg). Handle
  unbalanced quotes gracefully instead of crashing.
- Factor truncation into _truncate_output() (removes a duplicated long line).

Adds 12 tests covering operator/substitution rejection, URL-with-ampersand
acceptance, unbalanced-quote handling, shell-free proof (chained command's
second half never runs; $HOME not interpolated), and async parity.

Full suite: 755 passed, 40 skipped.
Harden command execution: shell-free and consistent across all paths
…lover

[codex] feat: add DeepSeek key management
…un-sidebar-collapse

[codex] Improve GUI agent auto-run and sidebar collapse
Spec for a new agent `install` action plus ToolInstaller module that
auto-installs missing security tools through the existing hardened
ToolRunner boundary. Allowlist-bounded by default, layered package
managers (apt/dnf/pacman/brew + pipx/pip/go), respects safe_mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tall drivers

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove package managers from the global allowlist so the agent cannot run
them via a normal execute action. ToolInstaller.install now invokes them
through a dedicated allow_install_drivers bypass on ToolRunner that permits
only config.INSTALL_DRIVERS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…l-install

feat: autonomous security-tool installation
Bring hackbot1 up to date with hackbot (19 commits)
@yashab-cyber
yashab-cyber merged commit f387cda into yashab-cyber:main Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants