Skip to content

feat(rulesets): let repository admins bypass required checks in pull requests - #35

Merged
fstagni merged 1 commit into
DIRACGrid:mainfrom
aldbr:feat/admin-bypass-required-checks
Dec 1, 2026
Merged

fstagni merged 1 commit into
DIRACGrid:mainfrom
aldbr:feat/admin-bypass-required-checks

Conversation

@aldbr

@aldbr aldbr commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Security advisory pull requests come from a temporary private fork where GitHub Actions does not run. Their required checks never report, so GitHub refuses the merge: "These changes may only be merged by someone that can bypass branch protections." No ruleset has a bypass actor today, so nobody can merge them.

Change

  • required-checks gets the repository admin role as a bypass actor, in pull_request mode. An admin can merge a pull request with "Merge without waiting for requirements", and the bypass is logged in the ruleset insights. Direct pushes to the protected branches stay blocked.
  • branches (review + signed commits) is unchanged: advisory PRs can satisfy it.
  • scripts/rulesets.py: a template lists an actor by name (always, as before) or as {"actor": name, "bypass_mode": "pull_request"}.
  • repos.toml gains the repository-admin actor (RepositoryRole 5).

Effect

scripts/rulesets.py diff on this branch: only required-checks.bypass_actors changes, in the 11 repositories that have required checks (.github, container-images, DB12, DIRAC, diraccfg, DIRACOS2, diracx-charts, management, mkdocs-diracx-plugin, Pilot, WebAppDIRAC). Everything else is in sync.

Tests and pre-commit pass. After merging: scripts/rulesets.py apply --repo <repo> --yes for each of them.

🤖 Generated with Claude Code

…requests

A security advisory's pull requests come from a temporary private fork
where GitHub Actions does not run, so the required checks never report
and GitHub refuses the merge ("may only be merged by someone that can
bypass branch protections"). DIRAC GHSA-wh9g-g683-q496 is blocked on it.

Add the repository admin role as a bypass actor of `required-checks`,
in `pull_request` mode: an admin can merge a pull request with "Merge
without waiting for requirements" (logged in the ruleset insights), and
pushes to the protected branches stay blocked. Templates can now give a
bypass mode next to an actor's name.

Assisted-by: Claude:claude-opus-5-5
@aldbr
aldbr requested a review from a team as a code owner December 1, 2026 07:57
@fstagni
fstagni merged commit be5233e into DIRACGrid:main Dec 1, 2026
1 check passed
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.

2 participants