Repository navigation
ci: let Scorecard read branch protection via SCORECARD_TOKEN - #94
Merged
Merged
Conversation
Wire the optional Administration: Read-only PAT into both Scorecard action steps so Branch-Protection can leave the -1 auth error once a maintainer stores the secret. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Closes #45
What changed
repo_token: ${{ secrets.SCORECARD_TOKEN || github.token }}to bothossf/scorecard-actionsteps so classic Branch-Protection rules are readable once a maintainer stores a fine-grained PAT (Administration: Read-only).mainprotection facts inSECURITY.md.repo_tokenintests/scorecard-floor.test.ts.Workflow changes
GITHUB_TOKENcannot read classic branch-protection rules; the official action needs an optionalrepo_tokenwith Administration: Read-only. The|| github.tokenfallback keeps weekly runs working before the secret exists.scorecard.ymlis schedule / workflow_dispatch / branch_protection_rule only, so pull-request runner minutes stay unchanged.Quality bar
Read docs/QUALITY.md before you change code, data, or docs. CI enforces its nine criteria: add no new debt, and allowlist existing debt only with an expiry.
Checks CI cannot make
changes/for user-visible changes (not for docs, test, ci, chore, build, refactor, or style)Verification
012e230): Branch-Protection = -1 — reason:some github tokens can't read classic branch protection rules.main(read via API): required status checkci-ok; force pushes off; deletions off; required approving review count0(intentional); conversation resolution currently off (SECURITY.md no longer claims it is on).SCORECARD_TOKENis not set yet (onlyALERTS_READ_TOKEN). Creating the fine-grained PAT and storing it asSCORECARD_TOKENremains a maintainer step; this PR only wires the workflow.npm ciandnpm run checkpassed locally.Scorecard Branch-Protection (before / after)
SCORECARD_TOKENset, then a Scorecard workflow run onmain; target ≥ 8 per #45Notes for reviewers
SCORECARD_TOKEN.workflow_dispatch, then confirm Branch-Protection ≥ 8 on the API and raise the floor intools/scorecard-floor.mjsin a follow-up if desired.