Skip to content

Block direct exec tool for Octo#100

Merged
pmbstyle merged 1 commit into
mainfrom
codex/propose-fix-for-critical-exec-vulnerability
May 17, 2026
Merged

Block direct exec tool for Octo#100
pmbstyle merged 1 commit into
mainfrom
codex/propose-fix-for-critical-exec-vulnerability

Conversation

@pmbstyle
Copy link
Copy Markdown
Owner

Motivation

  • Prevent the Octo runtime from exposing and executing the exec_run shell tool directly as part of its active tool set to reduce risk of arbitrary host command execution.
  • Ensure CLI tool-resolution diagnostics reflect the same denylist so administrators see accurate availability and blocked reasons.
  • Add regression coverage to prevent accidental re-exposure of exec_run in Octo's active tool set.

Description

  • Add a new policy step octo.direct_exec_denylist that denies exec_run to _get_octo_tools in src/octopal/runtime/octo/router.py so exec_run is removed from Octo's available tools by default.
  • Apply the same octo.direct_exec_denylist to CLI resolution via _octo_tool_policy_steps in src/octopal/cli/main.py to keep the CLI snapshot consistent with runtime policy.
  • Update tests in tests/test_octo_tool_loop.py, tests/test_router_tool_budget.py, and tests/test_cli_tools_resolve.py to assert exec_run is not present in Octo active tools and that attempted exec_run calls return a policy block.

Testing

  • Ran lint fixes and checks with uv run ruff check ... which passed after an automated import reordering fix.
  • Executed targeted tests with PYTHONPATH="src:.venv/lib/python3.14/site-packages" pytest ... for the modified tests and observed the targeted suite pass (4 passed, 20 warnings).
  • Verified bytecode compilation with uv run python -m compileall src/octopal ... which completed successfully.
  • Attempted full dev dependency sync with uv sync --extra dev and uv pip install pytest pytest-asyncio, but these failed due to PyPI tunnel/network errors in the environment and did not block the targeted validations.

Codex Task

@pmbstyle pmbstyle self-assigned this May 17, 2026
@pmbstyle pmbstyle merged commit 1188ed8 into main May 17, 2026
4 checks passed
@pmbstyle pmbstyle deleted the codex/propose-fix-for-critical-exec-vulnerability branch May 17, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant