ci(scorecard): add OpenSSF Scorecard workflow#997
Merged
Conversation
Add a weekly OpenSSF Scorecard analysis that uploads SARIF results to the code-scanning dashboard and publishes the score to the public OpenSSF API for the badge. Mirrors codeql.yml conventions: SHA-pinned actions (Dependabot-tracked), read-all default permissions with a least-privilege job, and a matching concurrency block. Triggers on push to main, a weekly schedule offset from CodeQL, and branch_protection_rule. Adds the Scorecard badge to README.
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.
Summary
Installs OpenSSF Scorecard as a
GitHub Actions workflow and adds its badge to the README.
.github/workflows/scorecard.ymlruns the Scorecard analyzer, uploadsthe SARIF to the code-scanning dashboard, and publishes the score to
the public OpenSSF API so the badge and the
scorecard.dev viewer
work.
Conventions followed
Mirrors the existing
codeql.yml:existing
github-actionsDependabot entry (directory: /,*):ossf/scorecard-action@…v2.4.3actions/checkout@…v7.0.0 (repo pin),persist-credentials: falseactions/upload-artifact@…v7.0.1github/codeql-action/upload-sarif@…v4.36.2 (repo pin)permissions: read-alldefault; the job adds onlysecurity-events: writeandid-token: write.concurrencyblock.Triggers
pushtomainschedule(Tue 07:41, offset from CodeQL's Mon 06:23)branch_protection_rule(re-scores when protection settings change)Notes
publish_results: truesends the score to the public OpenSSF API ondefault-branch runs — this powers the badge. Flip to
falseto keepresults private (code-scanning only) and drop the README badge.
maincompletesafter merge.
make actionlintpasses clean.