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
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,9 +83,13 @@ You can also use `-m` or `--merge` along with `-f --format` and `-o --output-fil
83
83
84
84
> Note: For backward compatibility, we still support `csv2cve` command for producing CVEs from csv but we recommend using new `--input-file` command instead.
85
85
86
-
`-L` or `--package-list` option runs a CVE scan on installed packages listed in a package list. It takes a python package list (requirements.txt) or a package list of packages of an Ubuntu system as an input for the scan. This option is much faster and detects more CVEs than the default method of scanning binaries.
86
+
`-L` or `--package-list` option runs a CVE scan on installed packages listed in a package list. It takes a python package list (requirements.txt) or a package list of packages of an Ubuntu or CentOS system as an input for the scan. This option is much faster and detects more CVEs than the default method of scanning binaries.
87
87
88
-
> You can get a package list of all installed packages in an Ubuntu system by running `dpkg-query -W -f '${binary:Package}\n' > pkg-list` in the terminal and provide it as an input for a full package scan.
88
+
You can get a package list of all installed packages in
89
+
- an Ubuntu system by running `dpkg-query -W -f '${binary:Package}\n' > pkg-list`
90
+
- a CentOS system by running `rpm -qa --queryformat '%{NAME}\n' > pkg-list`
91
+
92
+
in the terminal and provide it as an input by running `cve-bin-tool -L pkg-list` for a full package scan.
89
93
90
94
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. See our sample config files in the
r"package (.+) is not installed", output.stdout.decode("utf-8")
183
+
)
184
+
ifnot_installed_packages:
185
+
withErrorHandler(mode=error_mode):
186
+
raiseInvalidListError(
187
+
f"The packages {','.join(not_installed_packages)} seems to be not installed.\nIt is either an invalid package or not installed.\nUse `sudo yum install $(cat package-list)` to install all packages"
188
+
)
189
+
190
+
else:
191
+
# TODO: Replace below error handling with a proper pip install dry run
Copy file name to clipboardExpand all lines: doc/MANUAL.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -337,7 +337,7 @@ The output will look like following:
337
337
338
338
This option runs a CVE scan on installed packages listed in a package list. It takes a python package list (requirements.txt) or a package list of packages of an Ubuntu system as an input for the scan. This option is much faster and detects more CVEs than the default method of scanning binaries.
339
339
340
-
An example of the package list for Ubuntu systems:
340
+
An example of the package list for Linux systems:
341
341
342
342
```
343
343
bash
@@ -347,7 +347,10 @@ sed
347
347
python3
348
348
```
349
349
350
-
> Note: The packages in the package list should be installed in the system before the scan. Run `pip install -r requirements.txt` to install python packages and `sudo apt-get install $(package-list)` for packages in an Ubuntu system.
350
+
> Note: The packages in the package list should be installed in the system before the scan. Run
351
+
-`pip install -r requirements.txt` to install python packages
352
+
-`sudo apt-get install $(cat package-list)` for packages in an Ubuntu system
353
+
-`sudo yum install $(cat package-list)`for packages in a CentOS system
351
354
352
355
> Note: Don't use invalid package names in the package list, as it will throw errors.
353
356
@@ -356,7 +359,11 @@ You can test it using our [test package list](https://github.com/intel/cve-bin-t
356
359
```console
357
360
cve-bin-tool -L test/txt/test_ubuntu_list.txt
358
361
```
359
-
> You could get a package list of all installed packages in an Ubuntu system by running `dpkg-query -W -f '${binary:Package}\n' > pkg-list` in the terminal and provide it as an input for a full installed packages scan.
362
+
You can get a package list of all installed packages in
363
+
- an Ubuntu system by running `dpkg-query -W -f '${binary:Package}\n' > pkg-list`
364
+
- a CentOS system by running `rpm -qa --queryformat '%{NAME}\n' > pkg-list`
365
+
366
+
in the terminal and provide it as an input by running `cve-bin-tool -L pkg-list` for a full package scan.
0 commit comments