Skip to content

fix: block ref-qualified feature_branch names#23

Merged
mekilis merged 1 commit into
mainfrom
oksmart/block-ref-qualified-branch
Jul 19, 2026
Merged

fix: block ref-qualified feature_branch names#23
mekilis merged 1 commit into
mainfrom
oksmart/block-ref-qualified-branch

Conversation

@mekilis

@mekilis mekilis commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The feature_branch guard blocked literal main/master but not ref-qualified shapes like refs/heads/main, which pass the character allowlist and reach git push --force. refs/* is now rejected.
  • Same fix as feat: add OpenAPI-generated API client convoy-java#1 (flagged there by security review; applied here for guard parity).

Test plan

  • Guard-only change; dispatch path unchanged for valid branch names

Note

Low Risk
Single guard clause in a dispatch-only CI path; no runtime or application behavior changes.

Overview
Tightens the workflow_dispatch feature_branch validation in sdk_generation.yaml so ref-qualified names cannot slip past the existing main/master block.

The case pattern now includes refs/*, rejecting inputs like refs/heads/main that satisfy the character allowlist but could still reach git push --force against the default branch. A short comment documents why refs/* is treated as invalid.

Reviewed by Cursor Bugbot for commit b557aee. Bugbot is set up for automated code reviews on this repo. Configure here.

refs/heads/main would bypass the literal main check and force-push the
default branch. refs/* is now rejected like other protected shapes.
@mekilis
mekilis merged commit b93e2b9 into main Jul 19, 2026
3 checks passed
@mekilis
mekilis deleted the oksmart/block-ref-qualified-branch branch July 19, 2026 22:14
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