fix(ci): use commit SHA for ossf/scorecard-action (not tag-object SHA)#156
Merged
Conversation
The Scorecard publish API verifies that the workflow SHA belongs to a commit in ossf/scorecard-action. The tag v2.4.3 is annotated, so its tag-object SHA (99c09fe) is different from the commit SHA it points to (4eaacf05). Using the tag-object SHA caused: "imposter commit does not belong to ossf/scorecard-action". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the GitHub Scorecard workflow to reference the commit SHA corresponding to the v2.4.3 annotated tag of ossf/scorecard-action so that the Scorecard webapp receives a valid commit SHA for verification. Sequence diagram for Scorecard workflow verification with correct commit SHAsequenceDiagram
actor Developer
participant GitHubActions as GitHub_Actions
participant ScorecardAction as ossf_scorecard_action
participant OpenSSFWebapp
Developer->>GitHubActions: push to main
GitHubActions->>ScorecardAction: run ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a
ScorecardAction->>OpenSSFWebapp: publish_results with workflow SHA
alt using tag object SHA (previous config)
OpenSSFWebapp-->>ScorecardAction: 400 workflow verification failed (imposter commit)
else using commit SHA (this PR)
OpenSSFWebapp-->>ScorecardAction: 200 verification succeeded
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Pull request overview
Fixes the OpenSSF Scorecard workflow by replacing the annotated tag-object SHA for ossf/scorecard-action@v2.4.3 with the actual commit SHA, resolving the "imposter commit" verification error from the OpenSSF webapp.
Changes:
- Update
ossf/scorecard-actionpin to the dereferenced commit SHA (4eaacf0…) while keeping the# v2.4.3annotation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Root cause
ossf/scorecard-action@v2.4.3is an annotated tag, so it has two distinct SHAs:99c09fe975337306107572b4fdf4db224cf8e2f24eaacf0543bb3f2c246792bd56e8cdeffafb205aThe Scorecard
publish_results: truepath sends the workflow SHA to the OpenSSF webapp for signature verification. The webapp checks that the SHA belongs to an actual commit inossf/scorecard-action. Using the tag-object SHA caused:Fix
Replace the tag-object SHA with the dereferenced commit SHA in
scorecard.yml.🤖 Generated with Claude Code
Summary by Sourcery
CI: