You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
guardrails: block-convention-violation.sh has the same alias-chain re-expansion fail-open fixed for the other two guards in #964 #1089
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
Found by the #964 fixer during implementation (PR #1085). The third guardrails hook plugins/guardrails/hooks/block-convention-violation.sh (CC-layer commit-subject/PR-title content gate, shipped in #1071) contains the IDENTICAL defect pair fixed in the other two guards by #1085:
Re-expansion splice ${w[@]:0:gi+1} drops command-line -c/--config/--config-env globals from nested re-parses — inline-alias branch (~L289-307) and persisted-gitconfig-alias branch (~L308-326).
HOOK_NO_ALIAS one-level cap on the false premise git does not chain aliases.
Repro
git -c alias.c=x -c alias.x='commit -m "bad subject"' c — chained alias smuggles a convention-violating subject past the gate (gate exits 0 where a direct git commit -m would exit 2).
Severity / defer classification (tower)
Deferrable — NOT in the defer-forbidden carve-out: this gate enforces an opt-in commit-subject/PR-title regex convention ("UNRESOLVED = NO ENFORCEMENT" is its documented default), not data-loss protection, not a safety/merge gate, not a security control. Fail-open here means a convention slips through, which is reversible (amend/retitle) and caught downstream by the PR-title CI check. Materially lower blast radius than #964's two guards.
Fix direction
Either (a) port #1085's two changes verbatim (splice ${w[@]:0:sub_idx} + HOOK_ALIAS_SEEN save/restore seen-set), or preferably (b) fold into the SSOT extraction of the alias re-expansion logic to a shared lib — rejected for #964 as wrong pre-freeze tradeoff (brief comment on #964, id 5049748321) but correct long-term, and a third copy of the logic strengthens that case.
Triage — routing between the two fix directions. Option (b), folding the alias re-expansion logic into a shared SSOT lib, was already explicitly rejected as the wrong pre-freeze tradeoff for #964 (same two guards this issue's fix pattern comes from) — that reasoning applies identically here; a third copy strengthens the case for the eventual SSOT extraction but doesn't change the near-term call.
Decision defaulted: port #1085's two changes verbatim to block-convention-violation.sh (splice ${w[@]:0:sub_idx} + HOOK_ALIAS_SEEN save/restore) — veto before merge. The SSOT extraction stays a tracked future improvement, not blocking this fix. Routed status: ready on this basis.
Evidence:block-convention-violation.sh now splices alias argv through sub_idx (indices 0..sub_idx), matching block-dangerous-git's carry of command-line globals into each hop.
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.status: readyTriaged, unblocked, and fully specified; eligible to pick up.
Activity
kyle-sexton commentedon Jul 22, 2026
This was generated by AI during triage.
Triage — routing between the two fix directions. Option (b), folding the alias re-expansion logic into a shared SSOT lib, was already explicitly rejected as the wrong pre-freeze tradeoff for #964 (same two guards this issue's fix pattern comes from) — that reasoning applies identically here; a third copy strengthens the case for the eventual SSOT extraction but doesn't change the near-term call.
Decision defaulted: port #1085's two changes verbatim to
block-convention-violation.sh(splice${w[@]:0:sub_idx}+HOOK_ALIAS_SEENsave/restore) — veto before merge. The SSOT extraction stays a tracked future improvement, not blocking this fix. Routedstatus: readyon this basis.kyle-sexton commentedon Aug 12, 2026
Closing as fixed on
main.Evidence:
block-convention-violation.shnow splices alias argv throughsub_idx(indices0..sub_idx), matchingblock-dangerous-git's carry of command-line globals into each hop.plugins/guardrails/CHANGELOG.md0.28.2 documents fix for fix(guardrails): block-convention-violation's alias recursion drops git's own globals, over-blocking a mid-merge alias commit #2166plugins/guardrails/hooks/block-convention-violation.shrebuildsnextwatsub_idx, notgiParent umbrella #1085 and #2166 are already closed; this was the remaining convention-violation-specific tracking issue.