Skip to content

Commit 43f3f00

Browse files
committed
add info about verifying provenance attestations
Signed-off-by: Brian DeHamer <bdehamer@github.com>
1 parent de8d475 commit 43f3f00

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

content/packages-and-modules/securing-your-code/generating-provenance-statements.mdx

+20
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,26 @@ If you publish your packages with tools that do not directly invoke the `npm pub
144144

145145
In order to establish provenance, you must use a supported cloud CI/CD provider and a cloud-hosted runner to publish your packages. GitLab CI/CD is a supported CI/CD platform that allows you to automate software development tasks. For more information, see [Generating provenance in GitLab CI/CD][gitlab-ci-cd-docs] in the GitLab documentation.
146146

147+
## Verifying provenance attestations
148+
149+
You can use the verify the provenance attestations of downloaded packages with the following `audit` command:
150+
151+
```
152+
npm audit signatures
153+
```
154+
155+
Example response showing the count of verified registry signatures and verified attestations for all of the packages in a project:
156+
157+
```
158+
audited 1267 packages in 6s
159+
160+
1267 packages have verified registry signatures
161+
162+
74 packages have verified attestations
163+
```
164+
165+
Because provenance attestations are such a new feature, security features may be added to (or changed in) the attestation format over time. To ensure that you're always able to verify attestation signatures check that you're running the latest version of the npm CLI. Please note this often means updating npm beyond the version that ships with Node.js.
166+
147167
[provenance-info]: /searching-for-and-choosing-packages-to-download#package-provenance
148168
[update-npm]: /try-the-latest-stable-version-of-npm
149169
[github-provenance]: #publishing-packages-with-provenance-via-github-actions

0 commit comments

Comments
 (0)