Skip to content

fix(ci): pin scorecard-action and codecov to commit SHAs (not tag-object SHAs)#530

Merged
christiangda merged 1 commit into
mainfrom
fix/openssf-action-sha-dereference
May 23, 2026
Merged

fix(ci): pin scorecard-action and codecov to commit SHAs (not tag-object SHAs)#530
christiangda merged 1 commit into
mainfrom
fix/openssf-action-sha-dereference

Conversation

@christiangda
Copy link
Copy Markdown
Contributor

@christiangda christiangda commented May 23, 2026

Summary

Fixes the Scorecard analysis workflow failure caused by the publisher's "imposter commit" verifier rejecting our pin:

error sending scorecard results to webapp: 400 Bad Request,
"workflow verification failed: imposter commit:
99c09fe975337306107572b4fdf4db224cf8e2f2 does not belong to
ossf/scorecard-action"

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.3 and codecov/codecov-action@v5.5.4 turned out to be annotated tags. The GitHub API endpoint git/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.dev publisher specifically calls GET /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:

Action Was (tag object) Now (commit)
ossf/scorecard-action@v2.4.3 99c09fe975337306107572b4fdf4db224cf8e2f2 4eaacf0543bb3f2c246792bd56e8cdeffafb205a
codecov/codecov-action@v5.5.4 aa56896cf108bd10b5eb883cd1d24196da57f695 75cd11691c0faa626561e295848008c8a7dddffe

Each 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:

Check Before (5.2 aggregate) After PR-1 + PR-2
Token-Permissions 0 / 10 10 / 10
Pinned-Dependencies 0 / 10 10 / 10
Vulnerabilities 0 / 10 10 / 10
Aggregate 5.2 7.0

Once this PR lands, the publisher will accept the run and the live scorecard badge will reflect 7.0.

Test plan

  • Scorecard analysis workflow runs on this PR (or on next push to main) without the "imposter commit" error
  • Publish step uploads to securityscorecards.dev successfully

🤖 Generated with Claude Code

…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>
@christiangda christiangda self-assigned this May 23, 2026
@christiangda christiangda added this pull request to the merge queue May 23, 2026
Merged via the queue into main with commit 49100a0 May 23, 2026
5 checks passed
@christiangda christiangda deleted the fix/openssf-action-sha-dereference branch May 23, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant