Skip to content

🔒 [v5] ci-maintainer/sec-check: retrigger CI via run rerun, never by pushing to a reviewed PR branch - #6373

Merged
clubanderson merged 4 commits into
v5from
sec/no-branch-push-retrigger-6300
Sep 9, 2026
Merged

🔒 [v5] ci-maintainer/sec-check: retrigger CI via run rerun, never by pushing to a reviewed PR branch#6373
clubanderson merged 4 commits into
v5from
sec/no-branch-push-retrigger-6300

Conversation

@clubanderson

Copy link
Copy Markdown
Member

What changed

  • Added CI Retrigger Integrity rules to sec-check and ci-maintainer full/hold-gated policies, including embedded defaults.
  • The policy now requires gh run rerun <run-id> --failed or workflow_dispatch instead of branch pushes, skips reviewed/green PRs, and honors HIVE_CI_RETRIGGER_COOLDOWN_MINUTES (default 30 minutes) after maintainer cancellations.
  • Hardened the pushbroker to reject empty outgoing commits before a branch push.

Why

Pushing empty/no-op commits to PR branches resets review state in Prow-managed repos and should never be used as a CI retrigger mechanism. I found no existing Go retrigger loop to convert to the runs API, so this PR adds policy coverage and push-time enforcement for the branch-push failure mode.

How tested

  • cd src && go build ./... && go vet ./pkg/pushbroker ./pkg/policies && go test ./pkg/pushbroker ./pkg/policies
  • Result: pushbroker and policies tests passed.

Fixes #6300

…pushing to a reviewed PR branch

Reject empty outgoing commits in the pushbroker and document CI rerun rules for ci-maintainer and sec-check lanes.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 9, 2026
clubanderson and others added 3 commits September 9, 2026 09:51
Reject commits that become empty when broker newline normalisation amends the agent's outgoing change.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep first-push empty-commit checks scoped to the brokered HEAD commit so historical empty commits do not block real new branch work.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add pushbroker tests for empty-commit guard failure paths and head-only first-push handling to restore package coverage above the gate.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clubanderson

Copy link
Copy Markdown
Member Author

/approve

@clubanderson
clubanderson merged commit b7b2dd9 into v5 Sep 9, 2026
49 of 50 checks passed
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2026
@clubanderson
clubanderson deleted the sec/no-branch-push-retrigger-6300 branch September 9, 2026 15:31
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant