Skip to content

Commit 43ca5a1

Browse files
authored
fix: improve language test output, fix failing tests (#2422)
* fix: improve language test output, * fix: adjust language parser tests to reflect current reality * fix: add triage for bootstrap issues being mis-reported
1 parent 428a14a commit 43ca5a1

File tree

2 files changed

+149
-5
lines changed

2 files changed

+149
-5
lines changed

test/test_language_scanner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class TestLanguageScanner:
1919
"http-client",
2020
"generator",
2121
"expect",
22-
"yargs-parser",
2322
]
2423

2524
RUST_PRODUCTS = [
@@ -39,7 +38,6 @@ class TestLanguageScanner:
3938
"paste",
4039
"phf",
4140
"quote",
42-
"rand",
4341
"rand_core",
4442
"regex",
4543
"serde_cbor",
@@ -110,7 +108,6 @@ class TestLanguageScanner:
110108
"digest",
111109
"evaluate",
112110
"glue",
113-
"ini",
114111
"lattice",
115112
"lifecycle",
116113
"mime",
@@ -220,7 +217,10 @@ def test_language_package(self, filename: str, products) -> None:
220217
product_info, file_path = product
221218
if product_info.product not in found_product:
222219
found_product.append(product_info.product)
223-
assert all(x in products for x in found_product)
220+
# assert all(x in products for x in found_product)
221+
# expanded out to make missing products easier to spot
222+
for p in products:
223+
assert p in found_product
224224
assert file_path == filename
225225

226226
@pytest.mark.parametrize("filename", ((str(TEST_FILE_PATH / "PKG-INFO")),))

triage.json

Lines changed: 145 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,150 @@
7676
"ref": "urn:cdx:NOTKNOWN/1#plotly.js-2.13.2"
7777
}
7878
]
79-
}
79+
},
80+
{
81+
"id": "CVE-2016-10735",
82+
"source": {
83+
"name": "GAD"
84+
},
85+
"analysis": {
86+
"state": "not_affected",
87+
"response": [ "code_not_reachable" ],
88+
"justification": "Bad version detection with GAD",
89+
"detail": ""
90+
},
91+
"affects": [
92+
{
93+
"ref": "urn:cdx:NOTKNOWN/1#bootstrap-5.2.0"
94+
}
95+
],
96+
"vendor": "getbootstrap",
97+
"product": "bootstrap",
98+
"version": "5.2.0",
99+
"cve_number": "CVE-2016-10735",
100+
"severity": "MEDIUM",
101+
"score": "6.1",
102+
"source": "GAD",
103+
"cvss_version": "3",
104+
"cvss_vector": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
105+
"paths": "",
106+
"remarks": "Mitigated",
107+
"comments": ""
108+
},
109+
{
110+
"id": "CVE-2018-14040",
111+
"source": {
112+
"name": "GAD"
113+
},
114+
"analysis": {
115+
"state": "not_affected",
116+
"response": [ "code_not_reachable" ],
117+
"justification": "Bad version detection with GAD",
118+
"detail": ""
119+
},
120+
"affects": [
121+
{
122+
"ref": "urn:cdx:NOTKNOWN/1#bootstrap-5.2.0"
123+
}
124+
],
125+
"vendor": "getbootstrap",
126+
"product": "bootstrap",
127+
"version": "5.2.0",
128+
"cve_number": "CVE-2018-14040",
129+
"severity": "MEDIUM",
130+
"score": "6.1",
131+
"source": "GAD",
132+
"cvss_version": "3",
133+
"cvss_vector": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
134+
"paths": "",
135+
"remarks": "Mitigated",
136+
"comments": ""
137+
},
138+
{
139+
"id": "CVE-2018-14041",
140+
"source": {
141+
"name": "GAD"
142+
},
143+
"analysis": {
144+
"state": "not_affected",
145+
"response": [ "code_not_reachable" ],
146+
"justification": "Bad version detection with GAD",
147+
"detail": ""
148+
},
149+
"affects": [
150+
{
151+
"ref": "urn:cdx:NOTKNOWN/1#bootstrap-5.2.0"
152+
}
153+
],
154+
"vendor": "getbootstrap",
155+
"product": "bootstrap",
156+
"version": "5.2.0",
157+
"cve_number": "CVE-2018-14041",
158+
"severity": "MEDIUM",
159+
"score": "6.1",
160+
"source": "GAD",
161+
"cvss_version": "3",
162+
"cvss_vector": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
163+
"paths": "",
164+
"remarks": "Mitigated",
165+
"comments": ""
166+
},
167+
{
168+
"id": "CVE-2018-14042",
169+
"source": {
170+
"name": "GAD"
171+
},
172+
"analysis": {
173+
"state": "not_affected",
174+
"response": [ "code_not_reachable" ],
175+
"justification": "Bad version detection with GAD",
176+
"detail": ""
177+
},
178+
"affects": [
179+
{
180+
"ref": "urn:cdx:NOTKNOWN/1#bootstrap-5.2.0"
181+
}
182+
],
183+
"vendor": "getbootstrap",
184+
"product": "bootstrap",
185+
"version": "5.2.0",
186+
"cve_number": "CVE-2018-14042",
187+
"severity": "MEDIUM",
188+
"score": "6.1",
189+
"source": "GAD",
190+
"cvss_version": "3",
191+
"cvss_vector": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
192+
"paths": "",
193+
"remarks": "Mitigated",
194+
"comments": ""
195+
},
196+
{
197+
"id": "CVE-2019-8331",
198+
"source": {
199+
"name": "GAD"
200+
},
201+
"analysis": {
202+
"state": "not_affected",
203+
"response": [ "code_not_reachable" ],
204+
"justification": "Bad version detection with GAD",
205+
"detail": ""
206+
},
207+
"affects": [
208+
{
209+
"ref": "urn:cdx:NOTKNOWN/1#bootstrap-5.2.0"
210+
}
211+
],
212+
"vendor": "getbootstrap",
213+
"product": "bootstrap",
214+
"version": "5.2.0",
215+
"cve_number": "CVE-2019-8331",
216+
"severity": "MEDIUM",
217+
"score": "6.1",
218+
"source": "GAD",
219+
"cvss_version": "3",
220+
"cvss_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
221+
"paths": "",
222+
"comments": ""
223+
}
80224
]
81225
}

0 commit comments

Comments
 (0)