Skip to content

A security fix pull request says the approval from a person its branch rules need - #971

Merged
nambok merged 5 commits into
mainfrom
security-fix-says-approval-needed
Dec 5, 2026
Merged

nambok merged 5 commits into
mainfrom
security-fix-says-approval-needed

Conversation

@nambok

@nambok nambok commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

A security fix pull request CoderHelm opened on a repository whose default branch requires an approving review, from someone other than the last pusher, sat blocked and nothing said why. CoderHelm opened it and pushed every commit, so its own review can't count, and the security pass only followed the pull request's state and CI.

Changes

  • common::security_fixes: PrRef::person_approvals (the approvals the base branch requires, read once), approval_unread, approval_ask and APPROVAL_ASK_MARKER.
  • Worker security_fixes::track_prs: for an open fix pull request CoderHelm opened, reads the base branch's rulesets and classic protection once (read_approval_rule, using merge_standing::approvals_required). When they need approvals and no person approved the head, it comments once on the pull request ("Needs 1 approval from a person (repo rule).", skipped when a marked comment is already there) and adds one event to each finding ("Needs 1 approval from a person (repo rule) on #N.", the run page's own words). A person's approval at the head means it is read again on a later tick. Adopted pull requests are not read; nothing posts in a dry run.
  • Incident case xo_security_fix_says_the_approval_it_needs and its doc.

Verification

cargo fmt --check, the incidents rustfmt --check, and the platform's text, domain examples, brand spelling, secret literal and workflow checks pass. Clippy and the workspace tests were still running locally when this opened; CI runs them. "Rust (tests)" also needs #970, which fixes a case that fails on main.

…h rules need

A security fix pull request CoderHelm opened on a repository whose
default branch requires an approving review, from someone other than the
last pusher, sat blocked with nothing saying why. CoderHelm opened it and
pushed every commit, so its own review can't count, and the security pass
followed only the pull request's state and CI.

While such a pull request is open, the security pass now reads its base
branch's rules (rulesets and classic protection) once. When they require
approving reviews and no person has approved the head, it says exactly
what is needed: once on the pull request ("Needs 1 approval from a person
(repo rule).", marked so it is never posted twice) and once on each of its
findings ("Needs 1 approval from a person (repo rule) on #N."). Adopted
pull requests are not read, and nothing posts in a dry run.

Incident case xo replays it.
@nambok nambok added the ch-review CoderHelm reviews this pull request label Dec 4, 2026
coderhelm[bot]

This comment was marked as outdated.

@coderhelm

coderhelm Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Auto-merge
Merged by hand. Nothing left to do.
Commit into main. Merges on its own once every item is done.

coderhelm[bot]

This comment was marked as outdated.

The comment that a security fix pull request needs a person's approval was
posted straight to the tracker; it is now a note said through the
conversation layer like every other comment. The read's result type gets a
name so clippy passes.
coderhelm[bot]

This comment was marked as outdated.

@coderhelm coderhelm Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved 3c36fa1 (merged)

@nambok
nambok merged commit 8d51156 into main Dec 5, 2026
21 checks passed
@nambok
nambok deleted the security-fix-says-approval-needed branch December 5, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ch-review CoderHelm reviews this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant