fix(ci): pin scorecard-action and codecov to commit SHAs (not tag-object SHAs)#530
Merged
Merged
Conversation
…ects
The OpenSSF Scorecard publish step at securityscorecards.dev was
failing with:
workflow verification failed: imposter commit:
99c09fe975337306107572b4fdf4db224cf8e2f2 does not belong to
ossf/scorecard-action
Root cause: when PR-1 resolved the action SHAs, both ossf/scorecard-
action@v2.4.3 and codecov/codecov-action@v5.5.4 turned out to be
annotated tags. The `git/matching-refs/tags/<tag>` API returns the tag
object's SHA in that case, not the commit it points to. GitHub
Actions itself accepts either form, so CI ran fine — but the scorecard
publisher's "imposter commit" verifier rejects anything that isn't a
real commit on the action's repo.
Dereferenced both tags to their commit SHAs:
* ossf/scorecard-action @ v2.4.3
99c09fe975337306107572b4fdf4db224cf8e2f2 (tag object)
→ 4eaacf0543bb3f2c246792bd56e8cdeffafb205a (commit)
* codecov/codecov-action @ v5.5.4
aa56896cf108bd10b5eb883cd1d24196da57f695 (tag object)
→ 75cd11691c0faa626561e295848008c8a7dddffe (commit)
Verified each new SHA via `GET /repos/<owner>/<repo>/commits/<sha>`.
The codecov change is precautionary — codecov has no equivalent
verifier — but keeps the pinning style consistent across the repo.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
Fixes the
Scorecard analysisworkflow failure caused by the publisher's "imposter commit" verifier rejecting our pin:Failing run: https://github.com/slashdevops/idp-scim-sync/actions/runs/26330408504/job/77515436696
Root cause
When PR #523 resolved action SHAs to pin against, both
ossf/scorecard-action@v2.4.3andcodecov/codecov-action@v5.5.4turned out to be annotated tags. The GitHub API endpointgit/matching-refs/tags/<tag>returns the tag object's SHA in that case — not the commit it points to.GitHub Actions itself accepts either SHA form when running steps, so CI on PRs #523/#529 was green. But the
securityscorecards.devpublisher specifically callsGET /repos/<owner>/<repo>/commits/<sha>to verify the pin is a real commit on the action's repo — and that returns 404 for tag-object SHAs, hence "imposter commit".Fix
Dereferenced both tags to their commit SHAs:
ossf/scorecard-action@v2.4.399c09fe975337306107572b4fdf4db224cf8e2f24eaacf0543bb3f2c246792bd56e8cdeffafb205acodecov/codecov-action@v5.5.4aa56896cf108bd10b5eb883cd1d24196da57f69575cd11691c0faa626561e295848008c8a7dddffeEach new SHA verified via
GET /repos/<owner>/<repo>/commits/<sha>.The codecov change is precautionary — codecov has no equivalent verifier — but keeps the pinning style consistent. I also re-checked the other 8 SHA pins from PR-1 against the commits endpoint; they were all already commit SHAs (lightweight tags), so no further changes needed.
Bonus — partial scorecard baseline already improved
Before the publish step failed, the analysis itself completed and reported:
Once this PR lands, the publisher will accept the run and the live scorecard badge will reflect 7.0.
Test plan
Scorecard analysisworkflow runs on this PR (or on next push to main) without the "imposter commit" error🤖 Generated with Claude Code