@@ -6,19 +6,10 @@ description: Run a security audit
6
6
7
7
### Synopsis
8
8
9
- <!-- AUTOGENERATED USAGE DESCRIPTIONS START -->
10
- <!-- automatically generated, do not edit manually -->
11
- <!-- see lib/commands/audit.js -->
12
-
13
9
``` bash
14
10
npm audit [fix| signatures]
15
11
```
16
12
17
- <!-- automatically generated, do not edit manually -->
18
- <!-- see lib/commands/audit.js -->
19
-
20
- <!-- AUTOGENERATED USAGE DESCRIPTIONS END -->
21
-
22
13
### Description
23
14
24
15
The audit command submits a description of the dependencies configured in
@@ -109,9 +100,9 @@ the path `/-/npm/v1/security/advisories/bulk`.
109
100
110
101
Any packages in the tree that do not have a ` version ` field in their
111
102
package.json file will be ignored. If any ` --omit ` options are specified
112
- (either via the ` --omit ` config, or one of the shorthands such as
113
- ` --production ` , ` --only=dev ` , and so on), then packages will be omitted
114
- from the submitted payload as appropriate.
103
+ (either via the [ ` --omit ` config] ( /using-npm/config#omit ) , or one of the
104
+ shorthands such as ` --production ` , ` --only=dev ` , and so on), then packages will
105
+ be omitted from the submitted payload as appropriate.
115
106
116
107
If the registry responds with an error, or with an invalid response, then
117
108
npm will attempt to load advisory data from the ` Quick Audit ` endpoint.
@@ -188,7 +179,7 @@ vulnerabilities are found _or_ if the remediation is able to successfully
188
179
fix all vulnerabilities.
189
180
190
181
If vulnerabilities were found the exit code will depend on the
191
- ` audit-level ` configuration setting .
182
+ [ ` audit-level ` config ] ( /using-npm/config#audit-level ) .
192
183
193
184
### Examples
194
185
@@ -247,9 +238,6 @@ $ npm audit --audit-level=moderate
247
238
248
239
### Configuration
249
240
250
- <!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
251
- <!-- automatically generated, do not edit manually -->
252
- <!-- see lib/utils/config/definitions.js -->
253
241
#### ` audit-level `
254
242
255
243
* Default: null
@@ -258,9 +246,6 @@ $ npm audit --audit-level=moderate
258
246
The minimum level of vulnerability for ` npm audit ` to exit with a non-zero
259
247
exit code.
260
248
261
- <!-- automatically generated, do not edit manually -->
262
- <!-- see lib/utils/config/definitions.js -->
263
-
264
249
#### ` dry-run `
265
250
266
251
* Default: false
@@ -274,9 +259,6 @@ commands that modify your local installation, eg, `install`, `update`,
274
259
Note: This is NOT honored by other network related commands, eg ` dist-tags ` ,
275
260
` owner ` , etc.
276
261
277
- <!-- automatically generated, do not edit manually -->
278
- <!-- see lib/utils/config/definitions.js -->
279
-
280
262
#### ` force `
281
263
282
264
* Default: false
@@ -303,9 +285,6 @@ mistakes, unnecessary performance degradation, and malicious input.
303
285
If you don't have a clear idea of what you want to do, it is strongly
304
286
recommended that you do not use this option!
305
287
306
- <!-- automatically generated, do not edit manually -->
307
- <!-- see lib/utils/config/definitions.js -->
308
-
309
288
#### ` json `
310
289
311
290
* Default: false
@@ -318,9 +297,6 @@ Whether or not to output JSON data, rather than the normal output.
318
297
319
298
Not supported by all npm commands.
320
299
321
- <!-- automatically generated, do not edit manually -->
322
- <!-- see lib/utils/config/definitions.js -->
323
-
324
300
#### ` package-lock-only `
325
301
326
302
* Default: false
@@ -335,9 +311,6 @@ instead of checking `node_modules` and downloading dependencies.
335
311
For ` list ` this means the output will be based on the tree described by the
336
312
` package-lock.json ` , rather than the contents of ` node_modules ` .
337
313
338
- <!-- automatically generated, do not edit manually -->
339
- <!-- see lib/utils/config/definitions.js -->
340
-
341
314
#### ` omit `
342
315
343
316
* Default: 'dev' if the ` NODE_ENV ` environment variable is set to
@@ -356,9 +329,6 @@ it will be included.
356
329
If the resulting omit list includes ` 'dev' ` , then the ` NODE_ENV ` environment
357
330
variable will be set to ` 'production' ` for all lifecycle scripts.
358
331
359
- <!-- automatically generated, do not edit manually -->
360
- <!-- see lib/utils/config/definitions.js -->
361
-
362
332
#### ` foreground-scripts `
363
333
364
334
* Default: false
@@ -371,9 +341,6 @@ input, output, and error with the main npm process.
371
341
Note that this will generally make installs run slower, and be much noisier,
372
342
but can be useful for debugging.
373
343
374
- <!-- automatically generated, do not edit manually -->
375
- <!-- see lib/utils/config/definitions.js -->
376
-
377
344
#### ` ignore-scripts `
378
345
379
346
* Default: false
@@ -386,9 +353,6 @@ Note that commands explicitly intended to run a particular script, such as
386
353
will still run their intended script if ` ignore-scripts ` is set, but they
387
354
will * not* run any pre- or post-scripts.
388
355
389
- <!-- automatically generated, do not edit manually -->
390
- <!-- see lib/utils/config/definitions.js -->
391
-
392
356
#### ` workspace `
393
357
394
358
* Default:
@@ -411,9 +375,6 @@ brand new workspace within the project.
411
375
412
376
This value is not exported to the environment for child processes.
413
377
414
- <!-- automatically generated, do not edit manually -->
415
- <!-- see lib/utils/config/definitions.js -->
416
-
417
378
#### ` workspaces `
418
379
419
380
* Default: null
@@ -432,9 +393,6 @@ _unless_ one or more workspaces are specified in the `workspace` config.
432
393
433
394
This value is not exported to the environment for child processes.
434
395
435
- <!-- automatically generated, do not edit manually -->
436
- <!-- see lib/utils/config/definitions.js -->
437
-
438
396
#### ` include-workspace-root `
439
397
440
398
* Default: false
@@ -448,22 +406,14 @@ the specified workspaces, and not on the root project.
448
406
449
407
This value is not exported to the environment for child processes.
450
408
451
- <!-- automatically generated, do not edit manually -->
452
- <!-- see lib/utils/config/definitions.js -->
453
-
454
409
#### ` install-links `
455
410
456
- * Default: false
411
+ * Default: true
457
412
* Type: Boolean
458
413
459
- When set file: protocol dependencies that exist outside of the project root
460
- will be packed and installed as regular dependencies instead of creating a
461
- symlink. This option has no effect on workspaces.
462
-
463
- <!-- automatically generated, do not edit manually -->
464
- <!-- see lib/utils/config/definitions.js -->
465
-
466
- <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
414
+ When set file: protocol dependencies will be packed and installed as regular
415
+ dependencies instead of creating a symlink. This option has no effect on
416
+ workspaces.
467
417
468
418
### See Also
469
419
0 commit comments