Skip to content

Commit 18a0e42

Browse files
committed
🎉 Add 'fix_available' field to zora parser
1 parent e037f89 commit 18a0e42

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

dojo/tools/zora/parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ def get_findings(self, content, test: Test) -> list[Finding]:
4343
description += f"**Image**: {row.get('image')}\n"
4444
description += f"**ID**: {row.get('id')}\n"
4545
description += f"**Details**: {row.get('description')}\n"
46-
if row.get("fixVersion"):
47-
description += f"**Fix Version**: {row.get('fixVersion')}\n"
4846
mitigation = row.get("description", "")
4947
unique_id = f"{row.get('source')}-{row.get('image')}-{row.get('id')}"
5048
status = row.get("status", "").upper()
@@ -60,6 +58,10 @@ def get_findings(self, content, test: Test) -> list[Finding]:
6058
test=test,
6159
is_mitigated=is_mitigated,
6260
)
61+
if row.get("fixVersion") and row.get("fixVersion") != "":
62+
finding.fix_available = True
63+
else:
64+
finding.fix_available = False
6365
vuln_id = row.get("id")
6466
if vuln_id:
6567
finding.unsaved_vulnerability_ids = [vuln_id]

unittests/scans/zora/scan_many.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public key verification failed by calling SSL_get_verify_result(), and those
2121
that do, and take appropriate action, are not affected. This issue was
2222
introduced in the initial implementation of RPK support in OpenSSL 3.2.
2323
24-
The FIPS modules in 3.4, 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.","3.3.3-r0"
24+
The FIPS modules in 3.4, 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.",""
2525
"Trivy","ghcr.io/undistro/popeye:0.21","CVE-2024-13176","openssl: Timing side-channel in ECDSA signature computation","MEDIUM","fixed","Issue summary: A timing side-channel which could potentially allow recovering
2626
the private key exists in the ECDSA signature computation.
2727
@@ -38,7 +38,7 @@ process must either be located in the same physical computer or must
3838
have a very fast network connection with low latency. For that reason
3939
the severity of this vulnerability is Low.
4040
41-
The FIPS modules in 3.4, 3.3, 3.2, 3.1 and 3.0 are affected by this issue.","3.3.2-r2"
41+
The FIPS modules in 3.4, 3.3, 3.2, 3.1 and 3.0 are affected by this issue.",
4242
"Trivy","ghcr.io/undistro/popeye:0.21","CVE-2025-9230","openssl: Out-of-bounds read & write in RFC 3211 KEK Unwrap","MEDIUM","fixed","Issue summary: An application trying to decrypt CMS messages encrypted using
4343
password based encryption can trigger an out-of-bounds read and write.
4444

unittests/tools/test_zora_parser.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ def test_parse_file_with_many_vuln_has_many_findings(self):
1919
findings = parser.get_findings(content, Test())
2020
self.assertEqual(198, len(findings)) # Adjust based on your test file
2121
# Check a specific finding for correctness
22+
finding = findings[0]
23+
self.assertEqual(True, finding.fix_available)
24+
finding = findings[1]
25+
self.assertEqual(False, finding.fix_available)
26+
finding = findings[2]
27+
self.assertEqual(False, finding.fix_available)
28+
finding = findings[3]
29+
self.assertEqual(True, finding.fix_available)
2230
finding = findings[10]
2331
self.assertEqual("net/url: Insufficient validation of bracketed IPv6 hostnames in net/url", finding.title)
2432
self.assertEqual("Medium", finding.severity)
2533
self.assertTrue(finding.unique_id_from_tool.startswith(f"{finding.description.splitlines()[0].split(': ')[1]}"))
26-
self.assertIn("Fix Version", finding.description)
34+
self.assertEqual('**Source**: Trivy\n**Image**: ghcr.io/undistro/popeye:0.21\n**ID**: CVE-2025-47912\n**Details**: The Parse function permits values other than IPv6 addresses to be included in square brackets within the host component of a URL. RFC 3986 permits IPv6 addresses to be included within the host component, enclosed within square brackets. For example: "http://[::1]/". IPv4 addresses and hostnames must not appear within square brackets. Parse did not enforce this requirement.\n', finding.description)

0 commit comments

Comments
 (0)