You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[`e8102c1`](https://github.com/npm/cli/commit/e8102c1aae65a18e41253fbcdffe2eff0bedae53)[#5076](https://github.com/npm/cli/pull/5076) feat: Add `web` auth type ([@jumoel](https://github.com/jumoel))
9
+
*[`e9b4214`](https://github.com/npm/cli/commit/e9b4214e1ddb1ad79fe6826cf2ce7ba385f0c274)[#5094](https://github.com/npm/cli/pull/5094) feat(arborist): add support for dependencies script ([@nlf](https://github.com/nlf))
10
+
*[`c6c4ba3`](https://github.com/npm/cli/commit/c6c4ba3b62e2a0896a48329f4c7e13d9e44a2f80)[#5149](https://github.com/npm/cli/pull/5149) feat: notify on adduser of upcoming cmds, login and register ([@fritzy](https://github.com/fritzy))
11
+
*[`e58f02f`](https://github.com/npm/cli/commit/e58f02f5e8263bf86ae1f07a863098d445e6d0cd)[#5149](https://github.com/npm/cli/pull/5149) feat: warn on config --auth-type=sso/saml/oauth, undeprecate --auth-type ([@fritzy](https://github.com/fritzy))
12
+
13
+
### Bug Fixes
14
+
15
+
*[`52ec5ec`](https://github.com/npm/cli/commit/52ec5ec61fd3b266efd7a9c5712dd6a769a2d365)[#5154](https://github.com/npm/cli/pull/5154) fix: properly open package arg repo inside workspace ([@wraithgar](https://github.com/wraithgar))
16
+
17
+
### Documentation
18
+
19
+
*[`9697f16`](https://github.com/npm/cli/commit/9697f16952b1bf02bb5455c36a1995277cbc0c97)[#5118](https://github.com/npm/cli/pull/5118) docs: typo in npm command ([@crisanmm](https://github.com/crisanmm))
20
+
*[`da5a4ba`](https://github.com/npm/cli/commit/da5a4ba2c83af9a7e5e0fe38c32136adf396f557)[#5079](https://github.com/npm/cli/pull/5079) docs: update reference to deprecated spdx package ([@kachick](https://github.com/kachick))
21
+
*[`25b3058`](https://github.com/npm/cli/commit/25b305830be0892bbbf0245aee2eebdb76ee2ce3)[#5043](https://github.com/npm/cli/pull/5043) docs: naming of files in example code should be consistent ([@xc1427](https://github.com/xc1427))
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,15 +35,18 @@ $ node . run test
35
35
36
36
**5. Open a [Pull Request](https://github.com/npm/cli/pulls) for your work & become the newest contributor to `npm`! 🎉**
37
37
38
-
## Test Coverage
38
+
## Pull Request Conventions
39
39
40
-
We use [`tap`](https://node-tap.org/) for testing & expect that every new feature or bug fix comes with corresponding tests that validate the solutions. We strive to have as close to, if not exactly, 100% code coverage.
40
+
We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). When opening a pull request, please be sure that either the pull request title, or each commit in the pull request, has one of the following prefixes:
41
41
42
-
**You can find out what the current test coverage percentage is by running...**
42
+
-`feat`: For when introducing a new feature. The result will be a new semver minor version of the package when it is next published.
43
+
-`fix`: For bug fixes. The result will be a new semver patch version of the package when it is next published.
44
+
-`docs`: For documentation updates. The result will be a new semver patch version of the package when it is next published.
45
+
-`chore`: For changes that do not affect the published module. Often these are changes to tests. The result will be *no* change to the version of the package when it is next published (as the commit does not affect the published version).
43
46
44
-
```bash
45
-
$ node . run check-coverage
46
-
```
47
+
## Test Coverage
48
+
49
+
We use [`tap`](https://node-tap.org/) for testing & expect that every new feature or bug fix comes with corresponding tests that validate the solutions. Tap also reports on code coverage and it will fail if that drops below 100%.
Copy file name to clipboardExpand all lines: docs/content/commands/npm-audit.md
+49-8Lines changed: 49 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,14 +43,55 @@ output, it simply changes the command's failure threshold.
43
43
44
44
### Audit Signatures
45
45
46
-
This command can also audit the integrity values of the packages in your
47
-
tree against any signatures present in the registry they were downloaded
48
-
from. npm will attempt to download the keys from `/-/npm/v1/keys` on
49
-
each the registry used to download any given package. It will then
50
-
check the `dist.signatures` object in the package itself, and verify the
51
-
`sig` present there using the `keyid` there, matching it with a key
52
-
returned from the registry. The command for this is `npm audit
53
-
signatures`
46
+
To ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI.
47
+
48
+
Registry signatures can be verified using the following `audit` command:
49
+
50
+
```bash
51
+
$ npm audit signatures
52
+
```
53
+
54
+
The npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed:
55
+
56
+
1. Signatures are provided in the package's `packument` in each published version within the `dist` object:
See this [example](https://registry.npmjs.org/light-cycle/1.4.3) of a signed package from the public npm registry.
69
+
70
+
The `sig` is generated using the following template: `${package.name}@${package.version}:${package.dist.integrity}` and the `keyid` has to match one of the public signing keys below.
71
+
72
+
2. Public signing keys are provided at `registry-host.tld/-/npm/v1/keys` in the following format:
73
+
74
+
```
75
+
{
76
+
"keys": [{
77
+
"expires": null,
78
+
"keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
79
+
"keytype": "ecdsa-sha2-nistp256",
80
+
"scheme": "ecdsa-sha2-nistp256",
81
+
"key": "{{B64_PUBLIC_KEY}}"
82
+
}]
83
+
}
84
+
```
85
+
86
+
Keys response:
87
+
88
+
-`expires`: null or a simplified extended <ahref="https://en.wikipedia.org/wiki/ISO_8601"target="_blank">ISO 8601 format</a>: `YYYY-MM-DDTHH:mm:ss.sssZ`
89
+
-`keydid`: sha256 fingerprint of the public key
90
+
-`keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
91
+
-`scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI
92
+
-`key`: base64 encoded public key
93
+
94
+
See this <ahref="https://registry.npmjs.org/-/npm/v1/keys"target="_blank">example key's response from the public npm registry</a>.
0 commit comments