Repository navigation
ci: report OpenSSF Scorecard on pull requests (unblocks required status check) - #24
Merged
Merged
Conversation
Branch protection on main requires the status context "OpenSSF Scorecard", but .github/workflows/bytefolk-scorecard.yml only triggers on push to main, schedule and workflow_dispatch, so no pull request ever reports that context and every PR is permanently BLOCKED (enforce_admins is true, so admins cannot merge either). Adds a pull_request-triggered Scorecard job in local-checkout mode, with no publication credentials. The file is byte-identical to the already-reviewed .github/workflows/scorecard-pr.yml on bytefolk/roleweave@main (sha256 e2e50885a6705e9095e99b1928212e853a9ba8489b7e6db0c085f5a28ddc8f44). Because GitHub reads pull_request workflow definitions from the head branch, this PR reports OpenSSF Scorecard on its own head and can merge with no branch-protection change.
Bindy-lbb
approved these changes
Sep 12, 2026
Bindy-lbb
left a comment
Collaborator
There was a problem hiding this comment.
正式复审通过(head fb1dbec)。
该 PR 只新增一个 SHA-pinned 的 Scorecard pull_request workflow:contents: read、不写 SARIF、不使用 pull_request_target,并保持默认分支的发布/徽章 workflow 不变。当前 check、CodeQL、Dependency review、OpenSSF Scorecard 均成功。批准合入。
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.
Problem
Branch protection on
mainin this repository requires four status contexts (read live viaGET /repos/bytefolk/design-system/branches/main/protection):The first three are produced on
pull_requestby.github/workflows/ci.ymland.github/workflows/bytefolk-security.yml, and are green on every current open PR.OpenSSF Scorecardis not. It is emitted only by.github/workflows/bytefolk-scorecard.yml, whose trigger block is:No
pull_requesttrigger, so no pull request ever reports the context. Combined withenforce_admins: true,mergeStateStatusis permanentlyBLOCKEDand not even an administrator can merge. Verified empirically against the head SHAs of the currently open PRs #22 and #23 — both report exactly four check runs (check,Dependency review,CodeQL (javascript-typescript),CodeQL) and noOpenSSF Scorecard.Fix
Adds
.github/workflows/scorecard-pr.yml, which runs Scorecard in local-checkout mode onpull_requestand reports the requiredOpenSSF Scorecardjob context.Provenance: the file is byte-identical to the already-reviewed
.github/workflows/scorecard-pr.ymlonbytefolk/roleweave@main. Nothing has been authored or adapted here.e2e50885a6705e9095e99b1928212e853a9ba8489b7e6db0c085f5a28ddc8f44Self-unblocking
For
pull_requestevents GitHub reads workflow definitions from the head branch, so this PR reportsOpenSSF Scorecardon its own head. It can therefore be merged with no branch-protection change and no admin bypass.Security notes
permissions: contents: readonly — noid-token: write, nosecurity-events: write.publish_results: false— publication and the default-branch badge stay inbytefolk-scorecard.yml.pull_request_target; the job checks out the PR merge commit read-only.Scope
One new file added. No existing workflow, source file, or configuration is modified.