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
fix(guardrails): push block regex bypassed by flags between push and remote #104
git push --force origin main bypasses the protected branch push block in guardrail.ts because the regex \bgit\s+push\s+\S+\s+(?:HEAD:)?(\S+)/i matches --force as the remote name.
Root cause
The regex expects exactly: git push <remote> <branch> but doesn't account for flags like --force, -f, --no-verify between push and the remote.
Fix
Add optional flag group before remote: (?:(?:-\w+|--[\w-]+)\s+)*
Activity
Merge pull request #109 from Cor-Incorporated/fix/guardrails-follow-u…