Skip to content

Conversation

Copy link

Copilot AI commented Sep 10, 2025

This PR implements npm provenance verification to enhance supply chain security when deploying packages to the npm registry.

Changes Made

Workflow Improvements:

  • Renamed npm-publish-github-packages.yml to npm-publish.yml for clarity
  • Updated workflow name from "Node.js Package" to "Publish to npm"
  • Enhanced documentation with clear comments about provenance verification

Enhanced Security Configuration:

  • Maintained the existing id-token: write permission required for OIDC
  • Kept the npm publish --provenance flag that enables cryptographic attestation
  • Added --access public flag for explicit package visibility
  • Added clear inline documentation explaining provenance requirements

What is npm Provenance?

npm provenance verification creates cryptographic attestations that prove:

  • The package was built from the claimed source code
  • The build occurred in the expected GitHub Actions environment
  • The package hasn't been tampered with between build and publish

This allows consumers to verify the integrity and authenticity of published packages using:

npm audit signatures

Technical Details

The workflow now properly implements all requirements for npm provenance:

  • ✅ GitHub Actions with OIDC support
  • id-token: write permission for token generation
  • npm publish --provenance flag for attestation creation
  • ✅ Proper registry configuration pointing to npmjs.org

Verification

  • All existing tests continue to pass (13 tests across 6 files)
  • Build process verified and working correctly
  • YAML syntax validated with yamllint
  • Code quality maintained with biome linting

This change ensures that future package releases will include verifiable provenance information, enhancing trust and security for all consumers of the mock-jwks package.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • levino.eu.auth0.com
    • Triggering command: node (vitest 2) (dns block)
    • Triggering command: node (vitest 3) (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link

changeset-bot bot commented Sep 10, 2025

⚠️ No Changeset found

Latest commit: 4869a1b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@levino
Copy link
Owner

levino commented Sep 10, 2025

Already implemented.

@levino levino closed this Sep 10, 2025
@levino levino deleted the copilot/fix-5481a3e9-5eac-4c3a-916d-1bf60ab118df branch September 10, 2025 07:16
Copilot AI changed the title [WIP] Use the provenance verification feature when deploying the package to the npm registry. Implement npm provenance verification for secure package deployment Sep 10, 2025
Copilot AI requested a review from levino September 10, 2025 07:19
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.

2 participants