@@ -16,64 +16,68 @@ def test_one_findings(self):
1616 findings = parser .get_findings (testfile , Test ())
1717 self .assertEqual (1 , len (findings ))
1818 finding = findings [0 ]
19- self .assertEqual ("google. golang.org/protobuf - CVE-2024-24786 " , finding .title )
20- self .assertEqual ("Medium " , finding .severity )
21- self .assertEqual ("/grpc/proto /go.mod" , finding .file_path )
19+ self .assertEqual ("github.com/ golang-jwt/jwt/v4 4.5.1 - CVE-2025-30204 " , finding .title )
20+ self .assertEqual ("High " , finding .severity )
21+ self .assertEqual ("/settlements /go.mod" , finding .file_path )
2222 self .assertIn (
23- "**Library Name**: google.golang.org/protobuf\n "
24- "**Library Version**: 1.28.1\n "
25- "**Library Path**: /grpc/proto/go.mod\n "
26- "**Vulnerability Name**: CVE-2024-24786\n "
27- "**Fixed Version**: 1.33.0\n "
28- "**Source**: https://github.com/advisories/GHSA-8r3f-844c-mc37\n "
29- "**Description**: None\n "
30- "**Score**: None\n "
31- "**Exploitability Score**: None\n "
32- "**Has Exploit**: False\n "
33- "**Has CISA KEV Exploit**: False\n " ,
23+ "**Vulnerability**: `CVE-2025-30204`\n "
24+ "**Severity**: High\n "
25+ "**Library**: `github.com/golang-jwt/jwt/v4`\n "
26+ "**Version**: `4.5.1`\n "
27+ "**Path/Manifest**: `/settlements/go.mod`\n "
28+ "**Fixed Version**: 4.5.2\n "
29+ "**Source**: https://github.com/advisories/GHSA-mh63-6h87-95cp\n "
30+ "**Has Exploit (Known)**: False\n "
31+ "**In CISA KEV**: False" ,
3432 finding .description ,
3533 )
34+ self .assertEqual ("Update `github.com/golang-jwt/jwt/v4` to version `4.5.2` or later in path/manifest `/settlements/go.mod`." , finding .mitigation )
35+ self .assertEqual ("CVE-2025-30204" , finding .cve )
36+ self .assertEqual ("https://github.com/advisories/GHSA-mh63-6h87-95cp" , finding .references )
37+ self .assertTrue (finding .static_finding )
38+ self .assertFalse (finding .dynamic_finding )
39+ self .assertTrue (finding .active )
3640
3741 def test_multiple_findings (self ):
3842 with (get_unit_tests_scans_path ("wizcli_dir" ) / "wizcli_dir_many_vul.json" ).open (encoding = "utf-8" ) as testfile :
3943 parser = WizcliDirParser ()
4044 findings = parser .get_findings (testfile , Test ())
4145 self .assertEqual (7 , len (findings ))
46+
47+ # Test first finding
4248 finding = findings [0 ]
43- self .assertEqual ("golang.org/x/net - CVE-2023-44487 " , finding .title )
44- self .assertEqual ("Medium " , finding .severity )
45- self .assertEqual ("/grpc/proto /go.mod" , finding .file_path )
49+ self .assertEqual ("github.com/golang-jwt/jwt/v4 4.5.1 - CVE-2025-30204 " , finding .title )
50+ self .assertEqual ("High " , finding .severity )
51+ self .assertEqual ("/settlements /go.mod" , finding .file_path )
4652 self .assertIn (
47- "**Library Name**: golang.org/x/net\n "
48- "**Library Version**: 0.14.0\n "
49- "**Library Path**: /grpc/proto/go.mod\n "
50- "**Vulnerability Name**: CVE-2023-44487\n "
51- "**Fixed Version**: 0.17.0\n "
52- "**Source**: https://github.com/advisories/GHSA-qppj-fm5r-hxr3\n "
53- "**Description**: None\n "
54- "**Score**: 7.5\n "
55- "**Exploitability Score**: 3.9\n "
56- "**Has Exploit**: True\n "
57- "**Has CISA KEV Exploit**: True\n " ,
53+ "**Vulnerability**: `CVE-2025-30204`\n "
54+ "**Severity**: High\n "
55+ "**Library**: `github.com/golang-jwt/jwt/v4`\n "
56+ "**Version**: `4.5.1`\n "
57+ "**Path/Manifest**: `/settlements/go.mod`\n "
58+ "**Fixed Version**: 4.5.2\n "
59+ "**Source**: https://github.com/advisories/GHSA-mh63-6h87-95cp" ,
5860 finding .description ,
5961 )
60-
62+ self .assertEqual ("CVE-2025-30204" , finding .cve )
63+ self .assertEqual ("https://github.com/advisories/GHSA-mh63-6h87-95cp" , finding .references )
64+
65+ # Test second finding
6166 finding = findings [1 ]
62- self .assertEqual ("golang.org/x/net - CVE-2023-45288" , finding .title )
63- self .assertEqual ("Medium" , finding .severity )
64- self .assertEqual ("/grpc/proto/go.mod" , finding .file_path )
65- self .assertEqual (None , finding .line )
67+ self .assertEqual ("github.com/golang-jwt/jwt/v5 5.2.1 - CVE-2025-30204" , finding .title )
68+ self .assertEqual ("High" , finding .severity )
69+ self .assertEqual ("/settlements/go.mod" , finding .file_path )
6670 self .assertIn (
67- "**Library Name**: golang.org/x/net\n "
68- "**Library Version**: 0.14.0\n "
69- "**Library Path**: /grpc/proto/go.mod\n "
70- "**Vulnerability Name**: CVE-2023-45288\n "
71- "**Fixed Version**: 0.23.0\n "
72- "**Source**: https://github.com/advisories/GHSA-4v7x-pqxf-cx7m\n "
73- "**Description**: None\n "
74- "**Score**: None\n "
75- "**Exploitability Score**: None\n "
76- "**Has Exploit**: False\n "
77- "**Has CISA KEV Exploit**: False\n " ,
71+ "**Vulnerability**: `CVE-2025-30204`\n "
72+ "**Severity**: High\n "
73+ "**Library**: `github.com/golang-jwt/jwt/v5`\n "
74+ "**Version**: `5.2.1`\n "
75+ "**Path/Manifest**: `/settlements/go.mod`\n "
76+ "**Fixed Version**: 5.2.2\n "
77+ "**Source**: https://github.com/advisories/GHSA-mh63-6h87-95cp" ,
7878 finding .description ,
7979 )
80+ self .assertEqual ("CVE-2025-30204" , finding .cve )
81+ self .assertTrue (finding .static_finding )
82+ self .assertFalse (finding .dynamic_finding )
83+ self .assertTrue (finding .active )
0 commit comments