Skip to content

Commit 77397f8

Browse files
authored
chore: fix triage documentation and remove older test (#4374)
1 parent 34b82d8 commit 77397f8

File tree

11 files changed

+24
-686
lines changed

11 files changed

+24
-686
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ cabextract
7171
capnproto
7272
cbt
7373
CDNs
74+
CDX
7475
ceph
7576
cfa
7677
cfea

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,18 @@ The [VEX generation how-to guide](https://github.com/intel/cve-bin-tool/blob/mai
136136

137137
### Triaging vulnerabilities
138138

139-
The `--triage-input-file` option can be used to add extra triage data like remarks, comments etc. while scanning a directory so that output will reflect this triage data and you can save time of re-triaging (Usage: `cve-bin-tool --triage-input-file test.vex /path/to/scan`).
140-
The supported format is the [CycloneDX](https://cyclonedx.org/capabilities/vex/) VEX format which can be generated using the `--vex` option.
139+
The `--vex-file` option can be used to add extra triage data like remarks, comments etc. while scanning a directory so that output will reflect this triage data and you can save time of re-triaging (Usage: `cve-bin-tool --vex-file test.json /path/to/scan`).
140+
The supported format is the [CycloneDX](https://cyclonedx.org/capabilities/vex/),[CSAF](https://oasis-open.github.io/csaf-documentation/) and [OpenVEX](https://edu.chainguard.dev/open-source/sbom/what-is-openvex/) VEX format which can be generated using the `--vex-output` option.
141141

142142
Typical usage:
143143

144-
1. Generate triage file using `cve-bin-tool /path/to/scan --vex triage.vex`
145-
2. Edit triage.vex with your favourite text editor to provide triage information on the vulnerabilities listed.
146-
3. Use this triage file for future scans as follows: `cve-bin-tool /path/to/scan --triage-input-file triage.vex`
144+
1. Generate triage file using `cve-bin-tool /path/to/scan --vex-output triage.json`
145+
2. Edit triage.json with your favourite text editor to provide triage information on the vulnerabilities listed.
146+
3. Use this triage file for future scans as follows: `cve-bin-tool /path/to/scan --vex-file triage.json`
147147

148-
It should be possible to share triage data across different runs of cve-bin-tool or with other tools that support the CycloneDX VEX format. This would be particularly useful for teams that scan related products or containers, teams that need to use multiple tools for compliance reasons, companies that have a central security policy group that provides guidance on vulnerability triage, and more.
148+
For better usage guide refer this [link](https://cve-bin-tool.readthedocs.io/en/latest/triaging_process.html) .
149+
150+
It should be possible to share triage data across different runs of cve-bin-tool or with other tools that support the CycloneDX VEX, OpenVEX and CSAF format. This would be particularly useful for teams that scan related products or containers, teams that need to use multiple tools for compliance reasons, companies that have a central security policy group that provides guidance on vulnerability triage, and more.
149151

150152
### Using the tool offline
151153

@@ -172,8 +174,8 @@ cve-bin-tool file -f csv,json,html -o report
172174
Note: You must not use spaces between the commas (',') and the output formats.
173175

174176
The reported vulnerabilities can additionally be reported in the
175-
Vulnerability Exchange (VEX) format by specifying `--vex` command line option.
176-
The generated VEX file can then be used as a `--triage-input-file` to support
177+
Vulnerability Exchange (VEX) format by specifying `--vex-output` with type defined using `--vex-type` command line option.
178+
The generated VEX file can then be used as a `--vex-file` to support
177179
a triage process.
178180

179181
If you wish to use PDF support, you will need to install the `reportlab`
@@ -377,7 +379,7 @@ Users can add triage information to reports to mark issues as false positives, i
377379

378380
Triage details can be re-used on other projects so, for example, triage on a Linux base image could be applied to multiple containers using that image.
379381

380-
For more information and usage of triage information with the tool kindly have a look [here](https://cve-bin-tool.readthedocs.io/en/latest/MANUAL.html#triage-input-file-input-file).
382+
For more information and usage of triage information with the tool kindly have a look [here](https://cve-bin-tool.readthedocs.io/en/latest/triaging_process.html).
381383

382384
If you are using the binary scanner capabilities, be aware that we only have a limited number of binary checkers (see table above) so we can only detect those libraries. Contributions of new checkers are always welcome! You can also use an alternate way to detect components (for example, a bill of materials tool such as [tern](https://github.com/tern-tools/tern)) and then use the resulting list as input to cve-bin-tool to get a more comprehensive vulnerability list.
383385

@@ -451,8 +453,6 @@ Input:
451453
<a href="https://github.com/intel/cve-bin-tool/blob/main/doc/MANUAL.md#directory-positional-argument">directory</a> directory to scan
452454
<a href="https://github.com/intel/cve-bin-tool/blob/main/doc/MANUAL.md#-i-input_file---input-file-input_file">-i INPUT_FILE, --input-file INPUT_FILE</a>
453455
provide input filename
454-
<a href="https://github.com/intel/cve-bin-tool/blob/main/doc/MANUAL.md#--triage-input-file-input_file">--triage-input-file TRIAGE_INPUT_FILE</a>
455-
provide input filename for triage data
456456
<a href="https://github.com/intel/cve-bin-tool/blob/main/doc/MANUAL.md#-c-config---config-config">-C CONFIG, --config CONFIG</a>
457457
provide config file
458458
<a href="https://github.com/intel/cve-bin-tool/blob/main/doc/MANUAL.md#-l-package_list---package-list-package_list">-L PACKAGE_LIST, --package-list PACKAGE_LIST</a>

cve_bin_tool/cli.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,45 +345,48 @@ def main(argv=None):
345345
choices=["tag", "json", "yaml"],
346346
help="specify format of software bill of materials (sbom) to generate (default: tag)",
347347
)
348-
output_group.add_argument(
348+
vex_output_group = parser.add_argument_group(
349+
"Vex Output", "Arguments related to Vex output document."
350+
)
351+
vex_output_group.add_argument(
349352
"--vex-output",
350353
action="store",
351354
help="Provide vulnerability exchange (vex) filename to generate",
352355
default="",
353356
)
354-
output_group.add_argument(
357+
vex_output_group.add_argument(
355358
"--vex-type",
356359
action="store",
357360
default="",
358361
choices=["cyclonedx", "csaf", "openvex"],
359362
help="specify type of vulnerability exchange (vex) to generate (default: cyclonedx)",
360363
)
361-
output_group.add_argument(
364+
vex_output_group.add_argument(
362365
"--product",
363366
action="store",
364367
default="",
365368
help="Product Name",
366369
)
367-
output_group.add_argument(
370+
vex_output_group.add_argument(
368371
"--release",
369372
action="store",
370373
default="",
371374
help="Release Version",
372375
)
373-
output_group.add_argument(
376+
vex_output_group.add_argument(
374377
"--vendor",
375378
action="store",
376379
default="",
377380
help="Vendor/Supplier of Product",
378381
)
379-
output_group.add_argument(
382+
vex_output_group.add_argument(
380383
"-rr",
381384
"--revision-reason",
382385
action="store",
383386
default="",
384387
help="a reason for the update to the vex document should be specified in double quotes",
385388
)
386-
output_group.add_argument(
389+
vex_output_group.add_argument(
387390
"--filter-triage",
388391
action="store_true",
389392
default=False,

cve_bin_tool/config_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def config_generator(config_format, organized_arguments):
4646
group_args["sbom-type"]["arg_value"] = None
4747
group_args["sbom-format"]["arg_value"] = None
4848
group_args["sbom-output"]["arg_value"] = None
49+
if group_title == "vex_output":
4950
if group_args["vex-output"]["arg_value"] == "":
5051
group_args["vex-type"]["arg_value"] = None
5152
group_args["vex-output"]["arg_value"] = None

doc/MANUAL.md

Lines changed: 1 addition & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
- [Input Arguments](#input-arguments)
4141
- [directory (positional argument)](#directory-positional-argument)
4242
- [-i INPUT\_FILE, --input-file INPUT\_FILE](#-i-input_file---input-file-input_file)
43-
- [--triage-input-file INPUT\_FILE](#--triage-input-file-input_file)
4443
- [--sbom-file SBOM\_FILE](#--sbom-file-sbom_file)
4544
- [--vex-file VEX\_FILE](#--vex-file-vex_file)
4645
- [-L PACKAGE\_LIST, --package-list PACKAGE\_LIST](#-l-package_list---package-list-package_list)
@@ -703,140 +702,6 @@ Note that `--input-file`, unlike `cve-bin-tool directory` scan, will work on _an
703702

704703
> Note: For backward compatibility, we still support `csv2cve` command for producing CVEs from csv but we recommend using new `--input-file` command instead.
705704
706-
### --triage-input-file INPUT_FILE
707-
708-
This option allows you to provide triage data and incorporate that into the output so that people could spend less time re-triaging. The supported format
709-
is the [CycloneDX](https://cyclonedx.org/capabilities/vex/) VEX format which can be generated using the `--vex` option.
710-
For the triage process, the **state** value in the analysis section of each CVE should have one of the following values:
711-
712-
```
713-
"under_review" - this is the default state and should be used to indicate the vulnerability is to be reviewed
714-
"in_triage" - this should be used to indicate that the vulnerability is being reviewed
715-
"exploitable" - this should be used to indicate that the vulnerability is known to be exploitable
716-
"not_affected" - this should be used to indicate that the vulnerability has been mitigated
717-
```
718-
719-
The **detail** value in the analysis section can be used to provide comments related to the state
720-
721-
For example, if `input_file.csv` contains the following data:
722-
723-
```
724-
| vendor | product | version |
725-
| --------------- | --------- | --------- |
726-
| plot | plotly | h5.10.0 |
727-
| pocoo | jinja2 | 3.1.2 |
728-
| aiohttp_project | aiohttp | 3.8.1 |
729-
| pyyaml | pyyaml | 6.0 |
730-
| python | requests | 2.28.1 |
731-
| python | urllib3 | 1.26.12 |
732-
| skontar | cvss | 2.5 |
733-
| getbootstrap | bootstrap | 5.2.0 |
734-
| plotly | plotly.js | 2.13.2 |
735-
```
736-
737-
Where `aiohttp_project` and `plotly` are affected by `CVE-2022-33124` and `GMS-2016-69`, respectively,
738-
you could provide the following triage file:
739-
740-
```
741-
{
742-
"bomFormat": "CycloneDX",
743-
"specVersion": "1.4",
744-
"version": 1,
745-
"vulnerabilities": [
746-
{
747-
"id": "GMS-2016-69",
748-
"source": {
749-
"name": "NVD",
750-
"url": "https://nvd.nist.gov/vuln/detail/GMS-2016-69"
751-
},
752-
"ratings": [
753-
{
754-
"source": {
755-
"name": "NVD",
756-
"url": "https://nvd.nist.gov/vuln-metrics/cvss/v2-calculator?name=GMS-2016-69&vector=unknown&version=2.0"
757-
},
758-
"score": "unknown",
759-
"severity": "unknown",
760-
"method": "CVSSvunknown",
761-
"vector": "unknown"
762-
}
763-
],
764-
"cwes": [],
765-
"description": "If an attacker can trick an unsuspecting user into viewing a specially crafted plot on a site that uses plotly.js, then the attacker could potentially retrieve authentication tokens and perform actions on behalf of the user.",
766-
"recommendation": "",
767-
"advisories": [],
768-
"created": "NOT_KNOWN",
769-
"published": "NOT_KNOWN",
770-
"updated": "NOT_KNOWN",
771-
"analysis": {
772-
"state": "not_affected",
773-
"response": [ "code_not_reachable" ],
774-
"justification": "",
775-
"detail": ""
776-
},
777-
"affects": [
778-
{
779-
"ref": "urn:cdx:NOTKNOWN/1#plotly.js:2.13.2"
780-
}
781-
]
782-
}
783-
]
784-
}
785-
```
786-
787-
Then when you invoke `cve-bin-tool` like this:
788-
789-
```console
790-
cve-bin-tool -i="input_file.csv" --triage-input-file triage.vex
791-
```
792-
793-
The output will look like following:
794-
795-
```
796-
╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
797-
║ CVE BINARY TOOL version: 3.1.1 ║
798-
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
799-
800-
• Report Generated: 2022-11-09 13:52:20
801-
• Time of last update of CVE Data: 2022-11-09 13:39:31
802-
╭─────────────╮
803-
│ CVE SUMMARY │
804-
╰─────────────╯
805-
┏━━━━━━━━━━┳━━━━━━━┓
806-
┃ Severity ┃ Count ┃
807-
┡━━━━━━━━━━╇━━━━━━━┩
808-
│ CRITICAL │ 0 │
809-
│ HIGH │ 0 │
810-
│ MEDIUM │ 1 │
811-
│ LOW │ 0 │
812-
└──────────┴───────┘
813-
╭───────────────────╮
814-
│ Unexplored CVEs │
815-
╰───────────────────╯
816-
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
817-
┃ Vendor ┃ Product ┃ Version ┃ CVE Number ┃ Source ┃ Severity ┃ Score (CVSS Version) ┃
818-
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
819-
│ aiohttp_project │ aiohttp │ 3.8.1 │ CVE-2022-33124 │ NVD │ MEDIUM │ 5.5 (v3) │
820-
└─────────────────┴─────────┴─────────┴────────────────┴────────┴──────────┴──────────────────────┘
821-
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━┳━━━━━━━━━━┓
822-
┃ Vendor ┃ Product ┃ Version ┃ Root ┃ Filename ┃
823-
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━╇━━━━━━━━━━┩
824-
│ aiohttp_project │ aiohttp │ 3.8.1 │ │ │
825-
└─────────────────┴─────────┴─────────┴──────┴──────────┘
826-
╭──────────────────╮
827-
│ Mitigated CVEs │
828-
╰──────────────────╯
829-
┏━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
830-
┃ Vendor ┃ Product ┃ Version ┃ CVE Number ┃ Source ┃ Severity ┃ Score (CVSS Version) ┃
831-
┡━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
832-
│ plotly │ plotly.js │ 2.13.2 │ GMS-2016-69 │ GAD │ unknown │ unknown │
833-
└────────┴───────────┴─────────┴─────────────┴────────┴──────────┴──────────────────────┘
834-
┏━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━┳━━━━━━━━━━┓
835-
┃ Vendor ┃ Product ┃ Version ┃ Root ┃ Filename ┃
836-
┡━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━╇━━━━━━━━━━┩
837-
│ plotly │ plotly.js │ 2.13.2 │ │ │
838-
└────────┴───────────┴─────────┴──────┴──────────┘
839-
```
840705

841706
### --sbom-file SBOM_FILE
842707

@@ -931,7 +796,7 @@ input:
931796
directory: test/assets
932797
# To supplement triage data of previous scan or run standalone as csv2cve
933798
# Currently we only support vex file.
934-
triage_input_file: triage.vex
799+
vex_file: triage.json
935800

936801
checker:
937802
# list of checkers you want to skip

0 commit comments

Comments
 (0)