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(branch-protection): security check runs are never added to required status checks #1231
Add the built-in security check runs to GitHub branch protection's required status checks when configured as mandatory.
Problem / Motivation
The security-suspicious-paths and security-committer-identity checks appear on PRs but are not marked Required by GitHub. The server-side merge gate already treats them as mandatory, but get_required_status_checks() does not read security-checks when constructing branch-protection contexts.
Requirements
In get_required_status_checks(), read the existing security-checks config and append SECURITY_SUSPICIOUS_PATHS_STR and SECURITY_COMMITTER_IDENTITY_STR when applicable; use the constants, not string literals.
Respect mandatory: false, an empty suspicious-paths list, and committer-identity-check: false when deciding which checks to require.
Ensure exclude-runs can remove the security checks.
Decide and document whether mandatory security checks are included when a branch has explicit include-runs.
Add tests covering mandatory true/false, each individual check being disabled, and exclude-runs removal.
Run uv run ruff check --no-fix, uv run ruff format --check, uv run mypy webhook_server/, and uv run --group tests pytest -n auto.
Deliverables
Code changes
Tests
Document explicit include-runs behavior
Notes
Private repositories skip the set_repository branch-protection path and are outside this change. No config schema change is expected.
On the original Done checklist: everything is satisfied except the include-runs sub-item, which turned out to be a second, independent bug in the same function — exclude-runs was being silently discarded whenever include-runs was set. That was also fixed in PR #1232.
One deployment note: branch protection is applied at server startup, so this change takes effect on the next restart that runs repository setup, not on merge.
Correction to the comment above: PR #1232 is still open, not merged, so "landed in" was premature wording. The commits are pushed to the branch; the wording should be "will land in". Nothing else in that comment changes.
Activity
fix(branch-protection): add security checks to required status checks
myakove commentedon Sep 29, 2026
The fix for this issue has landed in PR #1232.
That PR also carries unrelated work, which is tracked separately:
fix(docs): eight documentation pages were empty and the generator was unrunnablefix: /automerge cancel added the label, and a docstring claimed the wrong status codeOn the original Done checklist: everything is satisfied except the
include-runssub-item, which turned out to be a second, independent bug in the same function —exclude-runswas being silently discarded wheneverinclude-runswas set. That was also fixed in PR #1232.One deployment note: branch protection is applied at server startup, so this change takes effect on the next restart that runs repository setup, not on merge.
myakove commentedon Sep 29, 2026
Correction to the comment above: PR #1232 is still open, not merged, so "landed in" was premature wording. The commits are pushed to the branch; the wording should be "will land in". Nothing else in that comment changes.
Assisted-by: PI (stealth/space-bunny-alpha)