Repository navigation
Scope question: does Scorecard cover the relationship between two revisions, or the state of a repository at a point in time? #5215
Replies: 1 comment
|
I don't see a current check that evaluates a supplied old/new commit pair. That is distinct from whether maintainers deliberately exclude it from future scope; I can't answer that policy/history question for them. For your consumer, I'd keep ancestry as a separate result alongside the Scorecard assessment. With both commits and complete history available: git merge-base --is-ancestor "$old_revision" "$new_revision"The direction matters: this asks whether the old commit is an ancestor of the new one. Git documents exit status 0 for yes, 1 for no, and other nonzero statuses for errors. Missing objects or incomplete/shallow history should produce an unknown result in your tool, not a confident rewrite verdict. A non-ancestor result can also be an intentional branch switch; an ancestor result does not establish that the new code is safe. On caching, the README says the API serves pre-calculated results, with CDN entries purged when new results arrive. The public scan is weekly, but repositories can also publish through the Scorecard Action, so “cache everything for seven days” would not follow from that schedule. I'd retain the assessment date and assessed revision with the cached result, make your acceptable staleness explicit, and avoid presenting a repository's latest score as an assessment of the newly locked commit unless the revisions match. A supported client TTL and numeric rate limit still need confirmation from the API maintainers; the weekly scan interval isn't either of those. |
Uh oh!
There was an error while loading. Please reload this page.
Hi — I am building a small Nix-native tool that uses the Scorecard API to
score the supply-chain health of flake inputs, so this is a consumer
question rather than a feature request.
The question. Scorecard's checks, as I read them, evaluate a repository as
it stands. The closest one to what I am asking about is Branch-Protection,
whose "Prevent force push" item "prevents use of the
--forcecommand onpublic branches, which overwrites code irrevocably" — so history rewriting is
clearly already on your radar. But that item asks whether a repository has a
setting today that would block a rewrite in future, on its default and release
branches. What I could not find is a check that evaluates a specific transition
that has already happened: whether the revision I am about to fetch is
reachable from the one I previously recorded, regardless of what protection
settings the repository does or does not have now.
Signed-Releases is adjacent too, but by its own documentation "the check does
not verify the signatures" — it looks for the artefact, not for what it
attests to.
So I would rather ask than assume: is that per-transition relation
deliberately out of scope, is it covered somewhere I missed, or is it
something that has come up before?
Any of the three is a useful answer to me. If it is out of scope, that is
entirely reasonable — a per-revision score and a per-edge check are different
shapes of question, and I am not suggesting Scorecard should grow one.
Why it matters in my corner. In the Nix ecosystem, dependencies are
pinned in a lock file by commit hash. That gives strong integrity for an
input already pinned — but at the moment the lock file is bumped, a
rewritten history and an ordinary release are indistinguishable at the hash
level. A per-repository score tells me the project is well run; it does not
tell me that the revision I am about to adopt continues the one I had.
And a practical consumer question, while I am here. For CI use I cache
Scorecard results rather than query per build. Is there guidance you would
give on cache lifetime, or on rate limits I should respect? I would rather
follow what you recommend than pick a number myself.
Thanks for the tool — the per-check breakdown is what made it usable as a
component rather than just a badge.
Disclosure: this comment was drafted with LLM assistance (Claude Opus 5, via
Claude Code). I read the checks documentation myself before writing, including
Branch-Protection and Signed-Releases in detail — the claim about what is not
covered comes from that reading. The questions about caching and rate limits
come from my own use of the live API, not from a mock. I am accountable for
both claims.
All reactions