Skip to content

fix(ci): refresh stale GitHub Action SHA pins after upstream force-pushes#61

Open
sebastienrousseau wants to merge 2 commits into
mainfrom
fix/stale-pins-after-v006
Open

fix(ci): refresh stale GitHub Action SHA pins after upstream force-pushes#61
sebastienrousseau wants to merge 2 commits into
mainfrom
fix/stale-pins-after-v006

Conversation

@sebastienrousseau
Copy link
Copy Markdown
Owner

Summary

Dependabot's first run on main (post-v0.0.6) failed because the
OpenSSF Scorecard pass in commit 834bfe6 pinned 7 GitHub
Actions to SHAs that the upstream maintainers later force-pushed
away from. The pins now point at git objects that no longer
exist:

Error processing EmbarkStudios/cargo-deny-action
error: no such commit 82eb9f621fbc699dd0918f3ea06864c14cc84246

Fix

Re-resolved each tag via gh api /repos/X/tags?per_page=100 | .commit.sha (which always returns the underlying commit SHA,
regardless of whether the tag is lightweight or annotated).
Round-trip-verified each new SHA via
gh api /repos/X/commits/<sha>.

Action Old (stale) New (verified)
actions/attest-build-provenance 96b4a1ef… e8998f94…
sigstore/cosign-installer f713795c… d58896d6…
EmbarkStudios/cargo-deny-action 82eb9f62… d8395c1c…
github/codeql-action/init ce28f5bb… 03e4368a…
github/codeql-action/analyze ce28f5bb… 03e4368a…
github/codeql-action/upload-sarif 4e828ff8… 03e4368a…
sebastienrousseau/pipelines/...rust-ci.yml 13013621… 47ed7767… (v0.0.2)

Root-cause prevention: the earlier mistake came from resolving
via /git/ref/tags/v2, which returns the tag-object SHA for
annotated tags (not the underlying commit). The new resolver
uses /tags?per_page=100 which always dereferences.

Dependabot can now resolve the pins on its next weekly run and
will keep them current going forward.

Test plan

  • Each new SHA verified resolvable via gh api /commits/<sha>.
  • No public-API change; CI-config only.
  • CI green on the topic branch.

…shes

The OpenSSF Scorecard pass in 834bfe6 pinned several actions to
SHAs that turned out to be stale once upstream maintainers
force-pushed their `v2` / `v3` tags. Dependabot's first run
flagged the breakage:

  Error processing EmbarkStudios/cargo-deny-action
  error: no such commit 82eb9f621fbc699dd0918f3ea06864c14cc84246

Seven pins refreshed against the current tag → commit mapping
(resolved via `gh api /repos/X/tags?per_page=100`):

  actions/attest-build-provenance        96b4a1ef… → e8998f94…  # v2
  sigstore/cosign-installer              f713795c… → d58896d6…  # v3
  EmbarkStudios/cargo-deny-action        82eb9f62… → d8395c1c…  # v2
  github/codeql-action/init              ce28f5bb… → 03e4368a…  # v3
  github/codeql-action/analyze           ce28f5bb… → 03e4368a…  # v3
  github/codeql-action/upload-sarif      4e828ff8… → 03e4368a…  # v3
  sebastienrousseau/pipelines/...        13013621… → 47ed7767…  # v0.0.2

Root cause of the earlier mistake: `gh api
/repos/X/git/ref/tags/v2` returns the tag-object SHA for
**annotated** tags (not the underlying commit). Used the
`tags?per_page=100` endpoint this time which always returns
`commit.sha` regardless of tag style.

Each new SHA verified by an explicit
`gh api /repos/X/commits/<sha>` round-trip before commit.
Dependabot can now resolve them on its next weekly run.

---
THE ARCHITECT ᛫ Sebastien Rousseau ᛫ https://sebastienrousseau.com
THE ENGINE ᛞ EUXIS ᛫ Enterprise Unified Execution Intelligence System ᛫ https://euxis.co

Assisted-by: Claude:claude-opus-4-7
The cargo-deny pin bumped to `d8395c1c…` (v0.20+) in the
sibling stale-pin commit. That release removed the top-level
`unmaintained = "workspace"` key (EmbarkStudios/cargo-deny#611)
— the unmaintained-crate signal now comes through standard
RustSec advisory entries (`unmaintained: main` / `unsound`),
not a dedicated config knob.

Without the migration the CI step fails with:

  error[deprecated]: this key has been removed
   ┌─ ./deny.toml:5:1
   │
 5 │ unmaintained = "workspace"
   │ ━━━━━━━━━━━━

Fix: delete the line. The severity flow stays the same — any
advisory below `severity-threshold` (default `low`) fails the
build unless listed in `ignore`. Inline comment captures the
why so the next maintainer doesn't re-add it.

---
THE ARCHITECT ᛫ Sebastien Rousseau ᛫ https://sebastienrousseau.com
THE ENGINE ᛞ EUXIS ᛫ Enterprise Unified Execution Intelligence System ᛫ https://euxis.co

Assisted-by: Claude:claude-opus-4-7
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