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
@@ -209,7 +210,7 @@ This option shows program's version number and exits.
209
210
210
211
This option skips checking for a new version of the program.
211
212
212
-
## Checkers Arguments:
213
+
## Checkers Arguments
213
214
214
215
### -s SKIPS, --skips SKIPS
215
216
@@ -219,7 +220,7 @@ This option allows one to skip (disable) a comma-separated list of checkers. Th
219
220
220
221
This option allows one to enable a comma-separated list of checkers.
221
222
222
-
## Input Arguments:
223
+
## Input Arguments
223
224
224
225
### directory (positional argument)
225
226
@@ -231,19 +232,19 @@ This option extends functionality of *csv2cve* for other formats like JSON and a
231
232
232
233
You can provide either CSV or JSON file as input_file with vendor, product and version fields. You can also add optional fields like remarks, comments, cve_number, severity. Here's the detailed description and usecase of each fields:
233
234
234
-
1.**vendor, product, version** - To query locally stored CVE database and give you a list of CVEs that affect each vendor, product, version listed.
235
-
2.**remarks** - remarks help you categorized different CVEs into different categories like:
236
-
-NewFound (1, n, N)
237
-
-Unexplored (2, u, U)
238
-
-Confirmed (3, c, C)
239
-
-Mitigated, (4, m, M)
240
-
-Ignored (5, i, I)
235
+
1.**vendor, product, version** - To query locally stored CVE database and give you a list of CVEs that affect each vendor, product, version listed.
236
+
2.**remarks** - remarks help you categorized different CVEs into different categories like:
237
+
- NewFound (1, n, N)
238
+
- Unexplored (2, u, U)
239
+
- Confirmed (3, c, C)
240
+
- Mitigated, (4, m, M)
241
+
- Ignored (5, i, I)
241
242
242
-
-All the characters denoted in parenthesis are aliases for that specific value. Output will be displayed in the same order as priority given to the remarks.
243
+
- All the characters denoted in parenthesis are aliases for that specific value. Output will be displayed in the same order as priority given to the remarks.
243
244
244
-
3.**comments** - You can write any comments you want to write in this field. This will be ignored in the console output but will be propagated as it is in CSV, JSON or HTML formats.
245
-
4.**severity** - This field allows you to adjust severity score of specific product or CVE. This can be useful in the case where CVE affects a portion of the library that you aren't using currently but you don't want to ignore it completely. In that case, you can reduce severity for this CVE.
246
-
5.**cve_number** - This field give you fine grained control over output of specific CVE. You can change remarks, comments and severity for specific CVE instead of whole product.
245
+
3.**comments** - You can write any comments you want to write in this field. This will be ignored in the console output but will be propagated as it is in CSV, JSON or HTML formats.
246
+
4.**severity** - This field allows you to adjust severity score of specific product or CVE. This can be useful in the case where CVE affects a portion of the library that you aren't using currently but you don't want to ignore it completely. In that case, you can reduce severity for this CVE.
247
+
5.**cve_number** - This field give you fine grained control over output of specific CVE. You can change remarks, comments and severity for specific CVE instead of whole product.
247
248
248
249
You can use `-i` or `--input-file` option to produce list of CVEs found in given vendor, product and version fields (Usage: `cve-bin-tool -i=test.csv`) or supplement extra triage data like remarks, comments etc. while scanning directory so that output will reflect this triage data and you can save time of re-triaging (Usage: `cve-bin-tool -i=test.csv /path/to/scan`).
249
250
@@ -265,9 +266,11 @@ For Example if input_file contains following data:
265
266
| ssh | ssh2 | 2.0 | Mitigated ||||
266
267
267
268
You can test it using our [test input file](https://github.com/intel/cve-bin-tool/blob/master/test/json/test_triage.json) with following command:
@@ -319,14 +322,121 @@ The output will look like following:
319
322
### -C CONFIG, --config CONFIG
320
323
321
324
We currently have number of command line options and we understand that it won't be feasible to type all the option everytime you want to run a scan. You can use `--config` option to provide configuration file for the tool. You can still override options specified in config file with command line arguments. We support 2 most popular config file format:
325
+
322
326
1. TOML which is popular amongst Python developer and very similar to INI file. If you are not familiar with TOML checkout official [TOML documentation](https://toml.io/en/)
323
327
2. YAML which is popular amongst devops community and since many of our users are devops. We also support YAML as config file format. You can find out more about YAML at [yaml.org](https://yaml.org/)
324
328
325
329
You can see our sample TOML config file [here](https://github.com/intel/cve-bin-tool/blob/master/test/config/cve_bin_tool_config.toml) and sample YAML config file [here](https://github.com/intel/cve-bin-tool/blob/master/test/config/cve_bin_tool_config.yaml).
326
330
327
331
> You have to specify either a directory to scan and/or an input file containing vendor, product and version fields either in JSON or CSV format.
328
332
329
-
## Output Arguments:
333
+
334
+
#### Yaml example file
335
+
336
+
```yaml
337
+
input:
338
+
# Directory to scan
339
+
directory: test/assets
340
+
# To supplement triage data of previous scan or run standalone as csv2cve
341
+
# Currently we only support csv and json file.
342
+
input_file: test/csv/triage.csv
343
+
344
+
checker:
345
+
# list of checkers you want to skip
346
+
skips:
347
+
- python
348
+
- bzip2
349
+
# list of checkers you want to run
350
+
runs:
351
+
- curl
352
+
- binutils
353
+
354
+
output:
355
+
# specify output verbosity from [debug, info, warning, error, critical]
356
+
# verbosity will decreases as you go left to right (default: info)
357
+
log_level: debug
358
+
# if true then we don't display any output and
359
+
# only exit-code with number of cves get returned
360
+
# overwrites setting specified in log_level
361
+
# Note: it's lowercase true or false
362
+
quiet: false
363
+
# specify one of an output format: [csv, json, html, console] (default: console)
364
+
format: console
365
+
# provide output filename (optional)
366
+
# if not specified we will generate one according to output format specified
367
+
output_file: ''
368
+
# specify minimum CVE severity level to report from [low, medium, high, critical] (default: low)
369
+
severity: low
370
+
# specify minimum CVSS score to report from integer range 0 to 10 (default: 0)
371
+
cvss: 0
372
+
other:
373
+
# set true if you want to skip checking for newer version
374
+
disable_version_check: false
375
+
# update schedule for NVD database (default: daily)
376
+
update: daily
377
+
# set true if you want to autoextract archive files. (default: true)
378
+
extract: true
379
+
```
380
+
381
+
#### Toml example file
382
+
383
+
```toml
384
+
[input]
385
+
386
+
# Directory to scan
387
+
directory = "test/assets"
388
+
389
+
# To supplement triage data of previous scan or run standalone as csv2cve
390
+
# Currently we only support csv and json file.
391
+
input_file = "test/csv/triage.csv"
392
+
393
+
[checker]
394
+
395
+
# list of checkers you want to skip
396
+
skips = ["python", "bzip2"]
397
+
398
+
# list of checkers you want to run
399
+
runs = ["curl", "binutils"]
400
+
401
+
[output]
402
+
403
+
# specify output verbosity from ["debug", "info", "warning", "error", "critical"]
404
+
# verbosity will decreases as you go left to right (default: "info")
405
+
log_level = "debug"
406
+
407
+
# if true then we don't display any output and
408
+
# only exit-code with number of cves get returned
409
+
# overwrites setting specified in log_level
410
+
# Note: it's lowercase true or false
411
+
quiet = false
412
+
413
+
# specify one of an output format: ["csv", "json", "html", "console"] (default: "console")
414
+
format = "console"
415
+
416
+
# provide output filename (optional)
417
+
# if not specified we will generate one according to output format specified
418
+
output_file = ""
419
+
420
+
# specify minimum CVE severity level to report from ["low", "medium", "high", "critical"] (default: "low")
421
+
severity = "low"
422
+
423
+
# specify minimum CVSS score to report from integer range 0 to 10 (default: 0)
424
+
cvss = 0
425
+
426
+
[other]
427
+
# set true if you want to skip checking for newer version
428
+
disable_version_check = false
429
+
430
+
# update schedule for NVD database (default: daily)
431
+
update = "daily"
432
+
433
+
# set true if you want to autoextract archive files. (default: true)
434
+
extract = true
435
+
```
436
+
437
+
438
+
439
+
## Output Arguments
330
440
331
441
Although the examples in this section show results for a single library to make them shorter and easier to read, the tool was designed to be run on entire directories and will scan all files in a directory if one is supplied.
332
442
@@ -342,7 +452,7 @@ This option specifies the theme directory to be used in formatting the HTML repo
342
452
343
453
This option allows the CVE Binary Tool to produce a report in an alternate format. This is useful if you have other tools which only take a specific format. The default is `console` which prints category wise beautiful tables of CVEs on terminal.
4.`--format html` - creates a report in html format according to the specified HTML theme.
505
+
4.`--format html` - creates a report in html format according to the specified HTML theme.
396
506
397
507
### -c CVSS, --cvss CVSS
398
508
@@ -402,14 +512,14 @@ This option specifies the minimum CVSS score (as integer in range 0 to 10) of th
402
512
403
513
This option specifies the minimum CVE severity to report. The default value is low which results in all CVEs being reported.
404
514
405
-
Note that this option is overridden by `--cvss` parameter if this is also specified.
515
+
Note that this option is overridden by `--cvss` parameter if this is also specified.
406
516
407
517
### Output verbosity
408
518
409
519
As well as the modes above, there are two other output options to decrease or increase the number of messages printed:
410
520
411
-
1.**Quiet mode (-q)** suppresses all output but exits with an error number indicating the number of files with known CVEs. This is intended for continuous integration and headless tests, while the other modes are all more human-friendly.
412
-
2.**Log mode (-l log_level)** prints logs of the specified log_level and above. The default log level is info. The logs can be suppressed by using quiet mode.
521
+
1.**Quiet mode (-q)** suppresses all output but exits with an error number indicating the number of files with known CVEs. This is intended for continuous integration and headless tests, while the other modes are all more human-friendly.
522
+
2.**Log mode (-l log_level)** prints logs of the specified log_level and above. The default log level is info. The logs can be suppressed by using quiet mode.
413
523
414
524
#### Quiet Mode
415
525
@@ -431,7 +541,7 @@ indicates that CVEs may be present in the code. A good result here is 0.
431
541
432
542
The logging modes provide additional fine-grained control for debug information.
0 commit comments