fix(ospo): drop bot bypass actor (org policy rejects it)#23
Merged
Conversation
The original OSPO hardening PR (#22) added a narrow PR-merge bypass for Integration 15368 (github-actions[bot]) so news-sync's PRs could self-merge. When attempting to import the ruleset via 'gh api PUT', the SAP-samples org rejected it: Validation Failed (HTTP 422) 'Actor GitHub Actions integration must be part of the ruleset source or owner organization' The org doesn't whitelist Integration 15368 as a permitted bypass actor at the repo level. Rather than file an OSPO ticket and wait, this commit drops the bypass entirely. Net effect: - No actor (admin or bot) can bypass the main ruleset - news-sync still opens a PR and arms 'gh pr merge --auto', but a maintainer must approve it before the auto-merge fires - OSPO Hardening Control 5 still passes (no bypass = stricter posture) CLAUDE.md updated to reflect 'human-in-the-loop' for automated PRs. This file change must merge before the corrected ruleset is PUT to the server (which is the operational step that activates the new posture).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
While operationalising PR #22 (OSPO hardening), the `gh api PUT` to import the new ruleset was rejected:
The SAP-samples org doesn't whitelist Integration 15368 (`github-actions[bot]`) as a permitted bypass actor at the repo level. The PR #22 ruleset JSON committed to the repo is therefore unimportable as-is.
What this PR does
.github/rulesets/main-protection.json— drops the bypass actor entirely (`bypass_actors: []`). No actor — admin or bot — can bypass the rules.CLAUDE.md— OSPO compliance paragraph updated to reflect human-in-the-loop for automated PRs.What this PR does NOT change
The `news-sync` workflow itself is unchanged. It still:
The net behaviour after this lands + the ruleset is imported: news-sync opens a PR every 12h with a content update; a maintainer reviews and approves; the merge fires automatically.
OSPO posture
Deployment ordering
Rollback
`git revert` this PR's merge commit; the previous bypass-with-bot version is one revert away.