Skip to content

security: retire Codex Cursor execution and approval bypass - #192

Draft
Pigbibi wants to merge 4 commits into
mainfrom
security/remove-local-agent-execution
Draft

Pigbibi wants to merge 4 commits into
mainfrom
security/remove-local-agent-execution

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Codex/Cursor local CLI launch, resume, login, model-discovery subprocess and updater execution are retired. Remove their picker options and all Full-mode approval-skip construction. Only the Claude executable with normal permission prompts may launch; existing API budget guards remain. Retired or unidentified windows cannot receive input/control keys. Keep historical transcript identifiers/parsers read-only. Old defaults and saved Full profiles fail closed rather than silently switching providers.

This changes live-service behavior: keep Draft. Owner must inspect in-flight sessions, choose a supported default, label/rebind verified Claude sessions and plan the deployment transition. No running process was killed/restarted and no server, secret value, IAM, trading configuration or paid model was accessed. Actual secrets/variables are untouched.

The old GitHub issue-to-Codex tmux dispatch is also retired before any process/input call. Direct API-wrapper options reject bypass permission modes and flag-as-value tricks, and launcher filtering removes equals-form bypass flags.

Validation: 962 full local tests passed before the last narrow bridge/parameter hardening; its follow-ups passed 30 bridge tests and 80 focused launcher/budget/retirement tests. Ruff lint/format, Pyright and diff whitespace passed. Final GitHub Python 3.12/3.13 checks, both test-summary jobs and Secret Scan all passed at head 21dcfda. No deployment or paid API validation.

Pigbibi and others added 3 commits October 15, 2026 02:34
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi

Pigbibi commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

复查结论(2026-11-09):本 PR 仍然有价值,保持 OPEN。main 仍保留 Codex/Cursor 本地 CLI 启动路径,且 src/telegram_agent_bot/claude_api_session.py 与 tmux_manager.py 里还有 dangerously-skip 相关代码,安全下线尚未完成。阻塞点是 PR 自述的 owner 决策(在途会话、默认 provider、部署切换窗口),外加 11 个冲突文件需 rebase。分支已保留。

# Conflicts:
#	docs/github-codex-bridge.md
#	src/telegram_agent_bot/bridge.py
#	tests/telegram_agent_bot/test_bridge.py
@Pigbibi

Pigbibi commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Conflict resolution (branch rebased onto latest main, no merge performed)

  • Merged origin/main into security/remove-local-agent-execution (8a610a6); PR is no longer CONFLICTING.
  • src/telegram_agent_bot/bridge.py: kept this PR's retired dispatch_to_tmux() (fail-closed, raises before any local process) and restored import os, which main's newer pending-reservation/state-persistence code needs. main's new _reserve_dispatch logic is retained; it catches TmuxTargetNotFoundError and skips dispatch, so the retirement remains effective.
  • tests/telegram_agent_bot/test_bridge.py: kept both this PR's test_retired_bridge_never_runs_tmux and all of main's new pending-reservation tests; removed test_input_side_effects_are_never_retried, which tested the tmux paste implementation this PR deletes.
  • docs/github-codex-bridge.md: resolved to the retirement notice, keeping the bilingual link. Note for reviewer: docs/github-codex-bridge.zh-CN.md still describes the old bridge and should be updated if this PR is accepted.
  • Verification: full pytest suite 1306 passed; ruff check clean.
  • This PR is still a draft and stays OPEN. It still needs the owner decision on retiring local Codex/Cursor execution and the dangerously-skip paths; this change only clears the merge conflicts.

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.

1 participant