Skip to content

chore(security): sign npm release tarball with cosign keyless#55

Merged
hesreallyhim merged 1 commit intomainfrom
security/scorecard-signed-releases
Apr 12, 2026
Merged

chore(security): sign npm release tarball with cosign keyless#55
hesreallyhim merged 1 commit intomainfrom
security/scorecard-signed-releases

Conversation

@hesreallyhim
Copy link
Copy Markdown
Owner

@hesreallyhim hesreallyhim commented Apr 12, 2026

Summary

  • Adds sigstore cosign keyless signing to the existing publish-npm.yml workflow
  • Produces a .sigstore bundle alongside the tarball on each release, uploaded to the GitHub release assets
  • No new secrets required — uses the existing id-token: write grant for OIDC
  • Consumers can verify with cosign verify-blob --bundle <tarball>.sigstore <tarball>

Scorecard impact

Addresses OSSF Scorecard's Signed-Releases check (currently 0/10). Scorecard examines the last 5 releases for .sigstore, .asc, .sig, or SLSA provenance files. Score moves to 10/10 after the next published release.

Changes

  • sigstore/cosign-installer@v3.10.1 (SHA-pinned) added as a new step
  • cosign sign-blob --yes --bundle signs the npm tarball after npm pack
  • gh release upload updated to include the .sigstore bundle
  • No changes to the npm publish step, trusted publishing flow, or any existing step logic

Test plan

  • Merge and create a pre-release to verify the cosign step runs and the .sigstore bundle appears in release assets
  • Verify cosign verify-blob succeeds against the downloaded bundle
  • Confirm the next scorecard run detects the signed release

🤖 Generated with Claude Code

Addresses OSSF Scorecard's Signed-Releases check (currently 0/10).
Scorecard examines the last 5 releases for cryptographic signing
evidence (.sigstore bundles, .asc, .sig, or SLSA provenance). None
of the existing releases carry any such artifacts.

Adding two additive steps to publish-npm.yml:

1. Install cosign via sigstore/cosign-installer@v3.10.1 (SHA-pinned).
2. Sign the npm tarball with cosign keyless mode (OIDC from the
   existing id-token: write grant — no new secrets required). Produces
   a .sigstore bundle alongside the tarball.

The existing gh-release-upload step is updated to include the
.sigstore bundle in the release assets. No changes to the npm
publish step, trusted publishing flow, or any existing step logic.

Cosign keyless signing uses GitHub's ambient OIDC token to produce
a Sigstore bundle that ties the artifact to this specific workflow
run. Consumers can verify with:

  cosign verify-blob --bundle <tarball>.sigstore <tarball> \
    --certificate-identity-regexp 'github.com/hesreallyhim/proton-pass-community-mcp' \
    --certificate-oidc-issuer https://token.actions.githubusercontent.com

Expected score impact: 0/10 -> 10/10 on the NEXT release (scorecard
checks the last 5 releases; this change only takes effect once
publish-npm.yml runs on a new release event).

🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hesreallyhim hesreallyhim merged commit 7abeaf7 into main Apr 12, 2026
9 checks passed
Repository owner deleted a comment from dawidbuczkowski379-ctrl Apr 15, 2026
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