Skip to content

Commit b4ea4bb

Browse files
Archives are extracted by default (previously needed -x)
* Fixes #786 * Retains -x option for backwards compatibility
1 parent 0998f29 commit b4ea4bb

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

cve_bin_tool/cli.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
EmptyCache,
3434
ErrorMode,
3535
)
36-
from .input_engine import (
37-
InputEngine,
38-
TriageData,
39-
)
36+
from .input_engine import InputEngine, TriageData
4037
from .log import LOGGER
4138
from .version import VERSION
4239
from .version_scanner import VersionScanner
@@ -185,7 +182,7 @@ def main(argv=None):
185182
"cvss": 0,
186183
"severity": "low",
187184
"update": "daily",
188-
"extract": False,
185+
"extract": True,
189186
"disable_version_check": False,
190187
"skips": "",
191188
"runs": "",

test/config/cve_bin_tool_config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ disable_version_check = false
4747
# update schedule for NVD database (default: daily)
4848
update = "daily"
4949

50-
# set true if you want to autoextract archive files. (default: false)
51-
extract = false
50+
# set true if you want to autoextract archive files. (default: true)
51+
extract = true

test/config/cve_bin_tool_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ other:
3838
disable_version_check: false
3939
# update schedule for NVD database (default: daily)
4040
update: daily
41-
# set true if you want to autoextract archive files. (default: false)
42-
extract: false
41+
# set true if you want to autoextract archive files. (default: true)
42+
extract: true

test/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_binary_curl_7_20_0(self):
5555

5656
def test_no_extraction(self):
5757
""" Test scanner against curl-7.20.0 rpm with extraction turned off """
58-
assert main(["cve-bin-tool", os.path.join(self.tempdir, CURL_7_20_0_RPM)]) == 0
58+
assert main(["cve-bin-tool", os.path.join(self.tempdir, CURL_7_20_0_RPM)]) != 0
5959

6060
def test_exclude(self, caplog):
6161
""" Test that the exclude paths are not scanned """

0 commit comments

Comments
 (0)