ci(release): add --provenance to npm publish; pin actions to commit SHAs#100
Merged
Conversation
Two supply-chain hardening fixes from issue #67: - release.yml npm publish step now passes --provenance so the published nodeup-cli package carries a SLSA-style attestation generated from the OIDC token (npm "Built and signed on GitHub Actions" badge). The release-checklist docs already call for this; the workflow just wasn't matching. - All 14 `uses:` lines in .github/workflows/ are now pinned to commit SHAs with a `# v<N>` readability comment, instead of mutable major-version tags. Covers actions/checkout, actions/setup-go, actions/setup-node, golangci/golangci-lint-action, wagoid/commitlint-github-action, codecov/codecov-action, goreleaser/goreleaser-action. SHAs were resolved at pin time from each repo's git/refs/tags/<v>. Closes #67
|
✔️ f568cc3 - Conventional commits check succeeded. |
This was referenced Jul 3, 2026
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
Two CI/CD supply-chain hardening fixes from issue #67:
.github/workflows/release.ymlnow passes--provenancetonpm publish. Pre-fix:Post-fix:
The release-checklist docs already call for
npm publish --provenance --access public(Option A) — theworkflow just wasn't matching. The OIDC setup is otherwise
correct (no hardcoded token,
permissions: id-token: writescoped to the publish job); only the flag was missing.
The flag attaches a SLSA-style attestation to the published
nodeup-clipackage, generated from the OIDC token, so npmcan display the "Built and signed on GitHub Actions" badge.
All 14 third-party
uses:lines in.github/workflows/are now pinned to commit SHAs instead of mutable
major-version tags. Pre-fix:
Post-fix:
The
# v<N>comment preserves the human-readable majorversion for grep-ability. SHAs were resolved at pin time
from each repo's
git/refs/tags/<v>(most arelightweight tags whose
object.shaIS the commit; theone annotated tag —
wagoid/commitlint-github-action@v5—was resolved one extra hop to the commit object). The
affected actions are:
actions/checkout,actions/setup-go,actions/setup-node,golangci/golangci-lint-action,wagoid/commitlint-github-action,codecov/codecov-action,goreleaser/goreleaser-action. The change covers all 14uses:occurrences in both workflow files.Risk class closed: a compromised or force-pushed tag on any
of those actions would silently pull unreviewed code into
release.yml, which runs withcontents: writeandhandles publish secrets. The existing
permissions:blocks (job-scoped, least-privileged) andabsence of
pull_request_target(verified clean) areunchanged and remain the primary defense.
Linked issues
Closes #67
Type of change
ci— CI/CD onlyfeat— new feature (MINOR bump)fix— bug fix (PATCH bump)refactor— no behavior changeperf— performance improvementtest— tests onlydocs— documentation onlychore— maintenance / dependency bumpbuild— build system onlyChecklist
ci(scope): subject)make cilocally and it passes (the change isCI-config-only; the Go pipeline still runs and stays
green)
the "test" for a workflow-config change is whether
CI's lint + test + build matrix still passes, which
this PR's CI run verifies)
CHANGELOG.mdgets a### Fixedentry under[Unreleased])make lintgreen)body and updated CHANGELOG.md
Files touched
.github/workflows/release.yml— adds--provenancetothe
npm publishstep; pinsactions/checkout,actions/setup-go,actions/setup-node,goreleaser/goreleaser-actionto commit SHAs..github/workflows/ci.yml— pinsactions/checkout,actions/setup-go,golangci/golangci-lint-action,wagoid/commitlint-github-action, andcodecov/codecov-actionto commit SHAs.CHANGELOG.md—### Fixedentry under[Unreleased]documenting the provenance flag and SHA pinning with ci(release): missing --provenance on npm publish; third-party Actions pinned to mutable tags not SHAs #67
reference.