Git guard is wrapper-blind and fails open #155

Closed
opened 2026-08-15 14:33:51 +00:00 by john · 0 comments
Owner

Source: strict re-review C-06; general scan recommendation 8
Verdict: DISPUTE - by design, closing

Claim as reviewed

The git guard only sees shell segments whose command word is literally git, so bash -c "git push" is intentionally invisible, and its top-level catch fails open. It cannot be treated as an inviolable push boundary.

At HEAD f354864 (v3.3.0)

Accurate on every point, and each is stated in the source. cadence-core/bin/lib/git-segments.mjs:74 requires the command word to be git; :58-61 enumerates the evasions by name - bash -c "git push", $(git push), sudo git push, xargs git push, env -S "git push". cadence-core/bin/git-guard.mjs:211 - try { main(); } catch { /* never block on a guard failure */ }.

Note

Detecting wide and gating back down was considered and rejected; failing open is deliberate so a guard bug cannot wedge normal work. The hard guarantee lives at the argument-vector publish seam, not here.

The wording half of this finding is filed and closed separately.

**Source:** strict re-review C-06; general scan recommendation 8 **Verdict:** DISPUTE - by design, closing ### Claim as reviewed The git guard only sees shell segments whose command word is literally `git`, so `bash -c "git push"` is intentionally invisible, and its top-level catch fails open. It cannot be treated as an inviolable push boundary. ### At HEAD f354864 (v3.3.0) Accurate on every point, and each is stated in the source. `cadence-core/bin/lib/git-segments.mjs:74` requires the command word to be `git`; `:58-61` enumerates the evasions by name - `bash -c "git push"`, `$(git push)`, `sudo git push`, `xargs git push`, `env -S "git push"`. `cadence-core/bin/git-guard.mjs:211` - `try { main(); } catch { /* never block on a guard failure */ }`. ### Note Detecting wide and gating back down was considered and rejected; failing open is deliberate so a guard bug cannot wedge normal work. The hard guarantee lives at the argument-vector publish seam, not here. The wording half of this finding is filed and closed separately.
john 2026-08-15 14:33:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: crenshawdev/cadence-archived#155
No description provided.