Skip to content

Commit 854dcc0

Browse files
committed
Fix CI tests
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 6aed574 commit 854dcc0

File tree

3 files changed

+54
-50
lines changed

3 files changed

+54
-50
lines changed

vulnerabilities/models.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,14 +3043,18 @@ def to_advisory_data(self) -> "AdvisoryDataV2":
30433043
advisory_id=self.advisory_id,
30443044
aliases=normalize_list([item.alias for item in self.aliases.all()]),
30453045
summary=self.summary,
3046-
affected_packages=normalize_list([
3047-
impacted.to_affected_package_data() for impacted in self.impacted_packages.all()
3048-
]),
3049-
references=normalize_list([ref.to_reference_v2_data() for ref in self.references.all()]),
3046+
affected_packages=normalize_list(
3047+
[impacted.to_affected_package_data() for impacted in self.impacted_packages.all()]
3048+
),
3049+
references=normalize_list(
3050+
[ref.to_reference_v2_data() for ref in self.references.all()]
3051+
),
30503052
patches=normalize_list([patch.to_patch_data() for patch in self.patches.all()]),
30513053
date_published=self.date_published,
30523054
weaknesses=normalize_list([weak.cwe_id for weak in self.weaknesses.all()]),
3053-
severities=normalize_list([sev.to_vulnerability_severity_data() for sev in self.severities.all()]),
3055+
severities=normalize_list(
3056+
[sev.to_vulnerability_severity_data() for sev in self.severities.all()]
3057+
),
30543058
url=self.url,
30553059
)
30563060

vulnerabilities/tests/test_data/openssl/release_metadata/openssl_advisoryv2-expected.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@
151151
"qualifiers": "",
152152
"subpath": ""
153153
},
154-
"affected_version_range": "vers:openssl/>=1.0.1|<1.0.1k",
155-
"fixed_version_range": "vers:openssl/1.0.1k",
154+
"affected_version_range": "vers:openssl/>=1.0.0|<1.0.0p",
155+
"fixed_version_range": "vers:openssl/1.0.0p",
156156
"introduced_by_commit_patches": [],
157157
"fixed_by_commit_patches": []
158158
},
@@ -165,8 +165,8 @@
165165
"qualifiers": "",
166166
"subpath": ""
167167
},
168-
"affected_version_range": "vers:openssl/>=1.0.0|<1.0.0p",
169-
"fixed_version_range": "vers:openssl/1.0.0p",
168+
"affected_version_range": "vers:openssl/>=1.0.1|<1.0.1k",
169+
"fixed_version_range": "vers:openssl/1.0.1k",
170170
"introduced_by_commit_patches": [],
171171
"fixed_by_commit_patches": []
172172
}
@@ -225,7 +225,7 @@
225225
"patches": [
226226
{
227227
"patch_url": "https://github.com/openssl/openssl/commit/7725e7bfe6f2ce8146b6552b44e0d226be7638e7",
228-
"patch_text": null,
228+
"patch_text": "",
229229
"patch_checksum": null
230230
}
231231
],
@@ -256,13 +256,13 @@
256256
"qualifiers": "",
257257
"subpath": ""
258258
},
259-
"affected_version_range": "vers:openssl/>=3.5.0|<3.5.4",
260-
"fixed_version_range": "vers:openssl/3.5.4",
259+
"affected_version_range": "vers:openssl/>=3.2.0|<3.2.6",
260+
"fixed_version_range": "vers:openssl/3.2.6",
261261
"introduced_by_commit_patches": [],
262262
"fixed_by_commit_patches": [
263263
{
264264
"vcs_url": "https://github.com/openssl/openssl",
265-
"commit_hash": "fc47a2ec078912b3e914fab5734535e76c4820c2",
265+
"commit_hash": "cba616c26ac8e7b37de5e77762e505ba5ca51698",
266266
"patch_text": null,
267267
"patch_checksum": null
268268
}
@@ -277,13 +277,13 @@
277277
"qualifiers": "",
278278
"subpath": ""
279279
},
280-
"affected_version_range": "vers:openssl/>=3.4.0|<3.4.3",
281-
"fixed_version_range": "vers:openssl/3.4.3",
280+
"affected_version_range": "vers:openssl/>=3.3.0|<3.3.5",
281+
"fixed_version_range": "vers:openssl/3.3.5",
282282
"introduced_by_commit_patches": [],
283283
"fixed_by_commit_patches": [
284284
{
285285
"vcs_url": "https://github.com/openssl/openssl",
286-
"commit_hash": "eed5adc9f969d77c94f213767acbb41ff923b6f4",
286+
"commit_hash": "567f64386e43683888212226824b6a179885a0fe",
287287
"patch_text": null,
288288
"patch_checksum": null
289289
}
@@ -298,13 +298,13 @@
298298
"qualifiers": "",
299299
"subpath": ""
300300
},
301-
"affected_version_range": "vers:openssl/>=3.3.0|<3.3.5",
302-
"fixed_version_range": "vers:openssl/3.3.5",
301+
"affected_version_range": "vers:openssl/>=3.4.0|<3.4.3",
302+
"fixed_version_range": "vers:openssl/3.4.3",
303303
"introduced_by_commit_patches": [],
304304
"fixed_by_commit_patches": [
305305
{
306306
"vcs_url": "https://github.com/openssl/openssl",
307-
"commit_hash": "567f64386e43683888212226824b6a179885a0fe",
307+
"commit_hash": "eed5adc9f969d77c94f213767acbb41ff923b6f4",
308308
"patch_text": null,
309309
"patch_checksum": null
310310
}
@@ -319,13 +319,13 @@
319319
"qualifiers": "",
320320
"subpath": ""
321321
},
322-
"affected_version_range": "vers:openssl/>=3.2.0|<3.2.6",
323-
"fixed_version_range": "vers:openssl/3.2.6",
322+
"affected_version_range": "vers:openssl/>=3.5.0|<3.5.4",
323+
"fixed_version_range": "vers:openssl/3.5.4",
324324
"introduced_by_commit_patches": [],
325325
"fixed_by_commit_patches": [
326326
{
327327
"vcs_url": "https://github.com/openssl/openssl",
328-
"commit_hash": "cba616c26ac8e7b37de5e77762e505ba5ca51698",
328+
"commit_hash": "fc47a2ec078912b3e914fab5734535e76c4820c2",
329329
"patch_text": null,
330330
"patch_checksum": null
331331
}

vulnerabilities/tests/test_data/ubuntu/ubuntu_osv_advisoryv2-expected.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@
5858
"namespace": "ubuntu",
5959
"name": "netqmail",
6060
"version": "",
61-
"qualifiers": "arch=source&distro=trusty/esm",
61+
"qualifiers": "arch=source&distro=bionic",
6262
"subpath": ""
6363
},
64-
"affected_version_range": "vers:deb/1.06-5",
65-
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.14.04.1+esm1",
64+
"affected_version_range": "vers:deb/1.06-6",
65+
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.18.04.1",
6666
"introduced_by_commit_patches": [],
6767
"fixed_by_commit_patches": []
6868
},
@@ -72,11 +72,11 @@
7272
"namespace": "ubuntu",
7373
"name": "netqmail",
7474
"version": "",
75-
"qualifiers": "arch=source&distro=xenial",
75+
"qualifiers": "arch=source&distro=focal",
7676
"subpath": ""
7777
},
78-
"affected_version_range": "vers:deb/1.06-5",
79-
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.16.04.1",
78+
"affected_version_range": "vers:deb/1.06-6.1",
79+
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.20.04.1",
8080
"introduced_by_commit_patches": [],
8181
"fixed_by_commit_patches": []
8282
},
@@ -86,11 +86,11 @@
8686
"namespace": "ubuntu",
8787
"name": "netqmail",
8888
"version": "",
89-
"qualifiers": "arch=source&distro=bionic",
89+
"qualifiers": "arch=source&distro=trusty/esm",
9090
"subpath": ""
9191
},
92-
"affected_version_range": "vers:deb/1.06-6",
93-
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.18.04.1",
92+
"affected_version_range": "vers:deb/1.06-5",
93+
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.14.04.1+esm1",
9494
"introduced_by_commit_patches": [],
9595
"fixed_by_commit_patches": []
9696
},
@@ -100,11 +100,11 @@
100100
"namespace": "ubuntu",
101101
"name": "netqmail",
102102
"version": "",
103-
"qualifiers": "arch=source&distro=focal",
103+
"qualifiers": "arch=source&distro=xenial",
104104
"subpath": ""
105105
},
106-
"affected_version_range": "vers:deb/1.06-6.1",
107-
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.20.04.1",
106+
"affected_version_range": "vers:deb/1.06-5",
107+
"fixed_version_range": "vers:deb/1.06-6.2~deb10u1build0.16.04.1",
108108
"introduced_by_commit_patches": [],
109109
"fixed_by_commit_patches": []
110110
}
@@ -272,10 +272,10 @@
272272
"namespace": "ubuntu",
273273
"name": "trafficserver",
274274
"version": "",
275-
"qualifiers": "arch=source&distro=xenial",
275+
"qualifiers": "arch=source&distro=bionic",
276276
"subpath": ""
277277
},
278-
"affected_version_range": "vers:deb/5.3.0-2ubuntu1|5.3.0-2ubuntu2",
278+
"affected_version_range": "vers:deb/7.0.0-5|7.1.2+ds-2|7.1.2+ds-2build1|7.1.2+ds-3",
279279
"fixed_version_range": null,
280280
"introduced_by_commit_patches": [],
281281
"fixed_by_commit_patches": []
@@ -286,10 +286,10 @@
286286
"namespace": "ubuntu",
287287
"name": "trafficserver",
288288
"version": "",
289-
"qualifiers": "arch=source&distro=bionic",
289+
"qualifiers": "arch=source&distro=esm-apps/focal",
290290
"subpath": ""
291291
},
292-
"affected_version_range": "vers:deb/7.0.0-5|7.1.2+ds-2|7.1.2+ds-2build1|7.1.2+ds-3",
292+
"affected_version_range": "vers:deb/8.0.5+ds-1|8.0.5+ds-2|8.0.5+ds-2build1|8.0.5+ds-2ubuntu1|8.0.5+ds-3|8.0.5+ds-3ubuntu0.1~esm1",
293293
"fixed_version_range": null,
294294
"introduced_by_commit_patches": [],
295295
"fixed_by_commit_patches": []
@@ -300,10 +300,10 @@
300300
"namespace": "ubuntu",
301301
"name": "trafficserver",
302302
"version": "",
303-
"qualifiers": "arch=source&distro=esm-apps/focal",
303+
"qualifiers": "arch=source&distro=esm-apps/jammy",
304304
"subpath": ""
305305
},
306-
"affected_version_range": "vers:deb/8.0.5+ds-1|8.0.5+ds-2|8.0.5+ds-2build1|8.0.5+ds-2ubuntu1|8.0.5+ds-3|8.0.5+ds-3ubuntu0.1~esm1",
306+
"affected_version_range": "vers:deb/8.1.1+ds-1.1|9.1.1+ds-2build1|9.1.1+ds-2ubuntu0.1~esm1",
307307
"fixed_version_range": null,
308308
"introduced_by_commit_patches": [],
309309
"fixed_by_commit_patches": []
@@ -314,10 +314,10 @@
314314
"namespace": "ubuntu",
315315
"name": "trafficserver",
316316
"version": "",
317-
"qualifiers": "arch=source&distro=esm-apps/jammy",
317+
"qualifiers": "arch=source&distro=xenial",
318318
"subpath": ""
319319
},
320-
"affected_version_range": "vers:deb/8.1.1+ds-1.1|9.1.1+ds-2build1|9.1.1+ds-2ubuntu0.1~esm1",
320+
"affected_version_range": "vers:deb/5.3.0-2ubuntu1|5.3.0-2ubuntu2",
321321
"fixed_version_range": null,
322322
"introduced_by_commit_patches": [],
323323
"fixed_by_commit_patches": []
@@ -370,10 +370,10 @@
370370
"namespace": "ubuntu",
371371
"name": "mongodb",
372372
"version": "",
373-
"qualifiers": "arch=source&distro=trusty",
373+
"qualifiers": "arch=source&distro=bionic",
374374
"subpath": ""
375375
},
376-
"affected_version_range": "vers:deb/1:2.4.6-0ubuntu5|1:2.4.6-0ubuntu6|1:2.4.8-1ubuntu1|1:2.4.8-2|1:2.4.9-1|1:2.4.9-1ubuntu1|1:2.4.9-1ubuntu2",
376+
"affected_version_range": "vers:deb/1:3.4.7-1|1:3.4.7-1ubuntu1|1:3.4.7-1ubuntu2|1:3.4.7-1ubuntu4|1:3.4.14-3ubuntu1|1:3.4.14-3ubuntu2|1:3.6.3-0ubuntu1|1:3.6.3-0ubuntu1.1|1:3.6.3-0ubuntu1.3|1:3.6.3-0ubuntu1.4",
377377
"fixed_version_range": null,
378378
"introduced_by_commit_patches": [],
379379
"fixed_by_commit_patches": []
@@ -384,10 +384,10 @@
384384
"namespace": "ubuntu",
385385
"name": "mongodb",
386386
"version": "",
387-
"qualifiers": "arch=source&distro=xenial",
387+
"qualifiers": "arch=source&distro=focal",
388388
"subpath": ""
389389
},
390-
"affected_version_range": "vers:deb/1:2.6.10-0ubuntu1",
390+
"affected_version_range": "vers:deb/1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu2|1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5|1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.2|1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3",
391391
"fixed_version_range": null,
392392
"introduced_by_commit_patches": [],
393393
"fixed_by_commit_patches": []
@@ -398,10 +398,10 @@
398398
"namespace": "ubuntu",
399399
"name": "mongodb",
400400
"version": "",
401-
"qualifiers": "arch=source&distro=bionic",
401+
"qualifiers": "arch=source&distro=trusty",
402402
"subpath": ""
403403
},
404-
"affected_version_range": "vers:deb/1:3.4.7-1|1:3.4.7-1ubuntu1|1:3.4.7-1ubuntu2|1:3.4.7-1ubuntu4|1:3.4.14-3ubuntu1|1:3.4.14-3ubuntu2|1:3.6.3-0ubuntu1|1:3.6.3-0ubuntu1.1|1:3.6.3-0ubuntu1.3|1:3.6.3-0ubuntu1.4",
404+
"affected_version_range": "vers:deb/1:2.4.6-0ubuntu5|1:2.4.6-0ubuntu6|1:2.4.8-1ubuntu1|1:2.4.8-2|1:2.4.9-1|1:2.4.9-1ubuntu1|1:2.4.9-1ubuntu2",
405405
"fixed_version_range": null,
406406
"introduced_by_commit_patches": [],
407407
"fixed_by_commit_patches": []
@@ -412,10 +412,10 @@
412412
"namespace": "ubuntu",
413413
"name": "mongodb",
414414
"version": "",
415-
"qualifiers": "arch=source&distro=focal",
415+
"qualifiers": "arch=source&distro=xenial",
416416
"subpath": ""
417417
},
418-
"affected_version_range": "vers:deb/1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu2|1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5|1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.2|1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5.3",
418+
"affected_version_range": "vers:deb/1:2.6.10-0ubuntu1",
419419
"fixed_version_range": null,
420420
"introduced_by_commit_patches": [],
421421
"fixed_by_commit_patches": []

0 commit comments

Comments
 (0)