Skip to content

[OSSFScorecard] Read api.scorecard.dev, not the diverged legacy host - #12121

Open
richcreations wants to merge 1 commit into
badges:masterfrom
richcreations:ossf-scorecard-api-host
Open

[OSSFScorecard] Read api.scorecard.dev, not the diverged legacy host#12121
richcreations wants to merge 1 commit into
badges:masterfrom
richcreations:ossf-scorecard-api-host

Conversation

@richcreations

@richcreations richcreations commented Sep 1, 2026

Copy link
Copy Markdown

Fixes #12117, where a Scorecard maintainer confirmed the divergence is a CDN
bug: purges reach api.scorecard.dev but not api.securityscorecards.dev.

Same repo, fetched just now:

host score result date
api.scorecard.dev 8.3 2026-09-01
api.securityscorecards.dev 7.3 2026-08-25

Response shape is unchanged, and both service-test fixtures behave identically
on the new host — rohankh532/org-workflow-add returns 200 with a score,
invalid-user/invalid-repo returns 404.

@rhalbersma had planned this PR; happy to close in favour of theirs.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️ This PR modified service code for ossf-scorecard but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @richcreations!

Generated by 🚫 dangerJS against 37f3d91

richcreations added a commit to richcreations/imud that referenced this pull request Sep 1, 2026
The canonical badge URL, https://api.scorecard.dev/projects/.../badge, is a
302 to img.shields.io/ossf-scorecard/..., and shields' ossf-scorecard service
hardcodes the legacy host api.securityscorecards.dev.  The two OpenSSF API
hosts have diverged, so the badge rendered 7.3 while the viewer it links to
showed 8.3.

Measured 2026-09-01, through shields' own dynamic/json route so that one
shields instance fetched both hosts in the same second:

  shields -> api.scorecard.dev            8.3
  shields -> api.securityscorecards.dev   7.3

Nothing on this side is caching it.  cf-cache-status was MISS on every
cache-busted request, a bogus repo path returned a live "invalid repo path",
and both hosts answer 8.3 when queried directly from here and from a
third-party fetcher on another network.  Querying ?commit=<sha> across the
history dates the freeze: the legacy host still serves the result for 7989661
(2026-08-25T20:03:14Z, 7.3), and the next published result, 504ae64 at 22:54
the same day, was 8.1.

Confirmed upstream in badges/shields#12117, where a Scorecard maintainer says
purges reach api.scorecard.dev but not api.securityscorecards.dev.  Fix sent
as badges/shields#12121; revert to the canonical URL once it lands.

Signed-off-by: Richard Simpson <richcreations@gmail.com>
richcreations added a commit to richcreations/imud that referenced this pull request Sep 1, 2026
The canonical badge URL, https://api.scorecard.dev/projects/.../badge, is a
302 to img.shields.io/ossf-scorecard/..., and shields' ossf-scorecard service
hardcodes the legacy host api.securityscorecards.dev.  The two OpenSSF API
hosts have diverged, so the badge rendered 7.3 while the viewer it links to
showed 8.3.

Measured 2026-09-01, through shields' own dynamic/json route so that one
shields instance fetched both hosts in the same second:

  shields -> api.scorecard.dev            8.3
  shields -> api.securityscorecards.dev   7.3

Nothing on this side is caching it.  cf-cache-status was MISS on every
cache-busted request, a bogus repo path returned a live "invalid repo path",
and both hosts answer 8.3 when queried directly from here and from a
third-party fetcher on another network.  Querying ?commit=<sha> across the
history dates the freeze: the legacy host still serves the result for 7989661
(2026-08-25T20:03:14Z, 7.3), and the next published result, 504ae64 at 22:54
the same day, was 8.1.

Confirmed upstream in badges/shields#12117, where a Scorecard maintainer says
purges reach api.scorecard.dev but not api.securityscorecards.dev.  Fix sent
as badges/shields#12121; revert to the canonical URL once it lands.

Signed-off-by: Richard Simpson <richcreations@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

ossf-scorecard reads api.securityscorecards.dev, which has diverged from api.scorecard.dev

1 participant