Skip to content

Commit 8c8aa6a

Browse files
authored
Merge pull request #26 from SAP-samples/ospo-pr-controls-2026-06
ci(ospo): add three PR controls + admin emergency bypass
2 parents 242c7a9 + 26b2220 commit 8c8aa6a

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/rulesets/main-protection.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
"type": "pull_request",
1616
"parameters": {
1717
"required_approving_review_count": 1,
18-
"dismiss_stale_reviews_on_push": false,
18+
"dismiss_stale_reviews_on_push": true,
1919
"require_code_owner_review": false,
20-
"require_last_push_approval": false,
21-
"required_review_thread_resolution": false
20+
"require_last_push_approval": true,
21+
"required_review_thread_resolution": true
2222
}
2323
},
2424
{
@@ -31,5 +31,7 @@
3131
}
3232
}
3333
],
34-
"bypass_actors": []
34+
"bypass_actors": [
35+
{"actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "pull_request"}
36+
]
3537
}

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ gh release edit vX.Y.Z --draft=false --latest --notes "release notes here"
230230
3. `sign-windows.yml` (workflow_run on Tray success, env: `signing`) → **pauses for required-reviewer approval** (OSPO gate), then Authenticode-signs Windows `.exe` binaries via SignPath.io and publishes the release (best-effort)
231231
4. Manual: `gh release edit --draft=false` only needed if signing is skipped — otherwise the signing job publishes automatically after approval
232232

233-
**OSPO compliance:** `main` is protected by ruleset (`main-protection`: requires PR + CI `test` check, blocks force-push and deletion). **No actor — including admins and `github-actions[bot]` — can bypass.** Every change to `main` goes through a PR with one approving review and a passing `test` check. Automated PRs (notably `news-sync`) open the PR and arm `gh pr merge --auto`; a maintainer must approve them, and the merge then fires automatically. (The SAP-samples org doesn't allow Integration `github-actions[bot]` as a bypass actor at the repo level, so the bot cannot self-merge — that's why a human approval is in the loop.) Workflows that touch secrets or publish artifacts run in named environments: `release`, `signing` (required reviewer = repo admin), `news-sync`. SignPath secrets and `YOUTUBE_API_KEY` should be scoped to their respective environments rather than the org/repo level. Ruleset spec: [.github/rulesets/main-protection.json](.github/rulesets/main-protection.json).
233+
**OSPO compliance:** `main` is protected by ruleset (`main-protection`: requires PR + 1 approval + CI `test` check, blocks force-push and deletion, dismisses stale approvals on new commits, requires approval of the most recent reviewable push, and requires conversation resolution before merging — added June 2026 ahead of central enforcement on 16 June 2026). **Repo admins retain a `pull_request`-mode bypass for emergency merges; this regresses OSPO Control 5 and is documented as an explicit owner decision (June 2026).** No other actor — including `github-actions[bot]` — can bypass. Every change to `main` goes through a PR with one approving review and a passing `test` check. Automated PRs (notably `news-sync`) open the PR and arm `gh pr merge --auto`; a maintainer must approve them, and the merge then fires automatically. (The SAP-samples org doesn't allow Integration `github-actions[bot]` as a bypass actor at the repo level, so the bot cannot self-merge — that's why a human approval is in the loop.) Workflows that touch secrets or publish artifacts run in named environments: `release`, `signing` (required reviewer = repo admin), `news-sync`. SignPath secrets and `YOUTUBE_API_KEY` should be scoped to their respective environments rather than the org/repo level. Ruleset spec: [.github/rulesets/main-protection.json](.github/rulesets/main-protection.json).
234234

235235
**Artifacts per release:** CLI binaries (linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64) + tray binaries (linux/amd64, darwin/arm64, windows/amd64) + checksums + tray-checksums + Scoop manifest + Homebrew cask.
236236

0 commit comments

Comments
 (0)