Skip to content

CC-496: fix Codex command-local guard bypass#407

Merged
screenleon merged 2 commits into
mainfrom
feat/CC-496-codex-command-local-bypass
Jul 15, 2026
Merged

CC-496: fix Codex command-local guard bypass#407
screenleon merged 2 commits into
mainfrom
feat/CC-496-codex-command-local-bypass

Conversation

@screenleon

Copy link
Copy Markdown
Owner

Summary

  • make the documented command-local PM_GUARD_PM_BASH=off bypass work through the Codex PreToolUse transport
  • keep the bypass anchored, case-sensitive, audited, and limited to one hook invocation
  • add regression coverage for valid, malformed, and non-inherited bypass behavior

Root cause

Codex runs the PreToolUse hook before Bash interprets a leading environment assignment. The guard therefore could not observe PM_GUARD_PM_BASH=off even though its denial message recommended that exact one-turn remediation.

Validation

  • Codex host guard suite: 43 passed, 0 failed
  • shell lint and backlog lint passed
  • Claude PR gate with explicit --test-cmd: GO (gate-20260715-044654-7da04e)
  • live acceptance: the audited command-local bypass successfully removed all confirmed merged local branches

Cleanup result

Only main and this feature branch remain locally. Git has one worktree, and the pmctl worktree registry is empty.

@screenleon screenleon marked this pull request as ready for review July 15, 2026 04:53
@screenleon screenleon merged commit 74cf43e into main Jul 15, 2026
49 checks passed
@screenleon screenleon deleted the feat/CC-496-codex-command-local-bypass branch July 15, 2026 04:54
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