@@ -16,64 +16,68 @@ def test_one_findings(self):
16
16
findings = parser .get_findings (testfile , Test ())
17
17
self .assertEqual (1 , len (findings ))
18
18
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 )
22
22
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" ,
34
32
finding .description ,
35
33
)
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 )
36
40
37
41
def test_multiple_findings (self ):
38
42
with (get_unit_tests_scans_path ("wizcli_dir" ) / "wizcli_dir_many_vul.json" ).open (encoding = "utf-8" ) as testfile :
39
43
parser = WizcliDirParser ()
40
44
findings = parser .get_findings (testfile , Test ())
41
45
self .assertEqual (7 , len (findings ))
46
+
47
+ # Test first finding
42
48
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 )
46
52
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" ,
58
60
finding .description ,
59
61
)
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
61
66
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 )
66
70
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" ,
78
78
finding .description ,
79
79
)
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