Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 949 Bytes

File metadata and controls

31 lines (20 loc) · 949 Bytes

Overview

The npm publish command does not include the --provenance flag. Provenance attestation cryptographically links the published package to a specific source commit and workflow run, allowing consumers to verify where and how the package was built.

Recommendation

Add --provenance to the npm publish command. This requires the workflow to have id-token: write permission and to run in a GitHub Actions environment.

Example

Incorrect Usage

- name: Publish
  run: npm publish

Correct Usage

permissions:
  id-token: write

- name: Publish
  run: npm publish --provenance

References