Skip to content

Commit f7e40d3

Browse files
committed
updated unit test files
1 parent 58c5687 commit f7e40d3

9 files changed

+45864
-2593
lines changed

unittests/scans/wizcli_dir/wizcli_dir_many_vul.json

Lines changed: 10517 additions & 369 deletions
Large diffs are not rendered by default.
Lines changed: 229 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -1,151 +1,245 @@
11
{
2-
"id": "800160eb-28b3-459c-a878-1e3d195a4a10",
3-
"projects": null,
4-
"createdAt": "2024-07-22T06:59:56.73798427Z",
5-
"startedAt": "0001-01-01T00:00:00Z",
6-
"createdBy": {
7-
"serviceAccount": {
8-
"id": "12312312312312312"
2+
"id": "800143dd-bf4b-4ac1-adf0-7a51c6d5cfcf",
3+
"projects": null,
4+
"createdAt": "2025-05-07T09:04:41.009892445Z",
5+
"startedAt": "0001-01-01T00:00:00Z",
6+
"createdBy": {
7+
"serviceAccount": {
8+
"id": "hycyzczp25cxpbmp67mtt2cg4mcadi4doz2fey4y4bgrqmk5b2ugs"
9+
}
10+
},
11+
"status": {
12+
"state": "SUCCESS",
13+
"verdict": "FAILED_BY_POLICY"
14+
},
15+
"policies": [
16+
{
17+
"id": "9bf73b16-99e7-4a54-af1e-dcfa1436a8f2",
18+
"name": "test Default vulnerabilities policy ( Updated )",
19+
"description": "Default built-in policy",
20+
"type": "VULNERABILITIES",
21+
"builtin": false,
22+
"projects": null,
23+
"policyLifecycleEnforcements": [
24+
{
25+
"enforcementMethod": "BLOCK",
26+
"deploymentLifecycle": "CLI"
27+
}
28+
],
29+
"ignoreRules": null,
30+
"lifecycleTargets": null,
31+
"Default": false,
32+
"params": {
33+
"__typename": "cicdscanpolicyparamsvulnerabilities",
34+
"severity": "HIGH",
35+
"packageCountThreshold": 1,
36+
"ignoreUnfixed": true,
37+
"packageAllowList": [],
38+
"detectionMethods": [
39+
"PACKAGE",
40+
"LIBRARY",
41+
"FILE_PATH"
42+
],
43+
"vulnerabilities": [],
44+
"fixGracePeriodHours": 0,
45+
"publishGracePeriodHours": 0
946
}
10-
},
11-
"status": {
12-
"state": "SUCCESS",
13-
"verdict": "PASSED_BY_POLICY"
14-
},
15-
"policies": [
47+
}
48+
],
49+
"extraInfo": null,
50+
"tags": null,
51+
"outdatedPolicies": [],
52+
"taggedResource": null,
53+
"scanOriginResource": {
54+
"__typename": "CICDScanOriginDirectory",
55+
"name": "/builds/test.ai/security/testappsec"
56+
},
57+
"result": {
58+
"__typename": "CICDDiskScanResult",
59+
"osPackages": null,
60+
"libraries": [
1661
{
17-
"id": "013bb6be-50b3-408e-8fbc-7a316756affc",
18-
"name": "Default sensitive data policy",
19-
"description": "Default built-in policy for sensitive data scanning",
20-
"type": "SENSITIVE_DATA",
21-
"builtin": true,
22-
"projects": null,
23-
"policyLifecycleEnforcements": [
62+
"name": "github.com/golang-jwt/jwt/v4",
63+
"version": "4.5.1",
64+
"path": "/settlements/go.mod",
65+
"vulnerabilities": [
2466
{
25-
"enforcementMethod": "AUDIT",
26-
"deploymentLifecycle": "CLI"
67+
"name": "CVE-2025-30204",
68+
"severity": "HIGH",
69+
"fixedVersion": "4.5.2",
70+
"fileRemediation": null,
71+
"source": "https://github.com/advisories/GHSA-mh63-6h87-95cp",
72+
"description": null,
73+
"score": null,
74+
"exploitabilityScore": null,
75+
"cvssV3Metrics": null,
76+
"cvssV2Metrics": null,
77+
"hasExploit": false,
78+
"hasCisaKevExploit": false,
79+
"cisaKevReleaseDate": null,
80+
"cisaKevDueDate": null,
81+
"epssProbability": null,
82+
"epssPercentile": null,
83+
"epssSeverity": null,
84+
"weightedSeverity": null,
85+
"publishDate": null,
86+
"fixPublishDate": null,
87+
"gracePeriodEnd": null,
88+
"gracePeriodRemainingHours": null,
89+
"failedPolicyMatches": [
90+
{
91+
"policy": {
92+
"id": "9bf73b16-99e7-4a54-af1e-dcfa1436a8f2",
93+
"name": "test Default vulnerabilities policy ( Updated )",
94+
"description": "Default built-in policy",
95+
"type": "VULNERABILITIES",
96+
"builtin": false,
97+
"projects": null,
98+
"policyLifecycleEnforcements": [
99+
{
100+
"enforcementMethod": "BLOCK",
101+
"deploymentLifecycle": "CLI",
102+
"enforcementConfig": null
103+
}
104+
],
105+
"ignoreRules": null,
106+
"lifecycleTargets": null,
107+
"Default": false,
108+
"params": {
109+
"__typename": "cicdscanpolicyparamsvulnerabilities",
110+
"severity": "HIGH",
111+
"packageCountThreshold": 1,
112+
"ignoreUnfixed": true,
113+
"packageAllowList": [],
114+
"detectionMethods": [
115+
"PACKAGE",
116+
"LIBRARY",
117+
"FILE_PATH"
118+
],
119+
"vulnerabilities": [],
120+
"fixGracePeriodHours": 0,
121+
"publishGracePeriodHours": 0
122+
}
123+
}
124+
}
125+
],
126+
"finding": null
27127
}
28128
],
29-
"ignoreRules": null,
30-
"lifecycleTargets": null,
31-
"Default": false,
32-
"params": {
33-
"__typename": "cicdscanpolicyparamssensitivedata",
34-
"dataFindingSeverityThreshold": "",
35-
"countThreshold": 0
36-
}
37-
},
38-
{
39-
"id": "6b4ccd22-b76a-45d1-98cf-30165587d718",
40-
"name": "Default vulnerabilities policy",
41-
"description": "Default built-in policy",
42-
"type": "VULNERABILITIES",
43-
"builtin": true,
44-
"projects": null,
45-
"policyLifecycleEnforcements": [
129+
"detectionMethod": "LIBRARY",
130+
"layerMetadata": null,
131+
"failedPolicyMatches": [
46132
{
47-
"enforcementMethod": "BLOCK",
48-
"deploymentLifecycle": "CLI"
133+
"policy": {
134+
"id": "9bf73b16-99e7-4a54-af1e-dcfa1436a8f2",
135+
"name": "test Default vulnerabilities policy ( Updated )",
136+
"description": "Default built-in policy",
137+
"type": "VULNERABILITIES",
138+
"builtin": false,
139+
"projects": null,
140+
"policyLifecycleEnforcements": [
141+
{
142+
"enforcementMethod": "BLOCK",
143+
"deploymentLifecycle": "CLI",
144+
"enforcementConfig": null
145+
}
146+
],
147+
"ignoreRules": null,
148+
"lifecycleTargets": null,
149+
"Default": false,
150+
"params": {
151+
"__typename": "cicdscanpolicyparamsvulnerabilities",
152+
"severity": "HIGH",
153+
"packageCountThreshold": 1,
154+
"ignoreUnfixed": true,
155+
"packageAllowList": [],
156+
"detectionMethods": [
157+
"PACKAGE",
158+
"LIBRARY",
159+
"FILE_PATH"
160+
],
161+
"vulnerabilities": [],
162+
"fixGracePeriodHours": 0,
163+
"publishGracePeriodHours": 0
164+
}
165+
}
49166
}
50-
],
51-
"ignoreRules": null,
52-
"lifecycleTargets": null,
53-
"Default": false,
54-
"params": {
55-
"__typename": "cicdscanpolicyparamsvulnerabilities",
56-
"severity": "CRITICAL",
57-
"packageCountThreshold": 1,
58-
"ignoreUnfixed": true,
59-
"packageAllowList": [],
60-
"detectionMethods": null,
61-
"fixGracePeriodHours": 0,
62-
"publishGracePeriodHours": 0
63-
}
167+
]
64168
}
65169
],
66-
"extraInfo": null,
67-
"tags": null,
68-
"outdatedPolicies": [],
69-
"taggedResource": null,
70-
"scanOriginResource": {
71-
"__typename": "CICDScanOriginDirectory",
72-
"name": "/Users/osama/Documents/testing"
170+
"applications": null,
171+
"cpes": null,
172+
"secrets": null,
173+
"dataFindings": null,
174+
"vulnerableSBOMArtifactsByNameVersion": null,
175+
"hostConfiguration": {
176+
"hostConfigurationFrameworks": null,
177+
"hostConfigurationFindings": null
73178
},
74-
"result": {
75-
"__typename": "CICDDiskScanResult",
76-
"osPackages": null,
77-
"libraries": [
78-
{
79-
"name": "google.golang.org/protobuf",
80-
"version": "1.28.1",
81-
"path": "/grpc/proto/go.mod",
82-
"vulnerabilities": [
179+
"failedPolicyMatches": [
180+
{
181+
"policy": {
182+
"id": "9bf73b16-99e7-4a54-af1e-dcfa1436a8f2",
183+
"name": "test Default vulnerabilities policy ( Updated )",
184+
"description": "Default built-in policy",
185+
"type": "VULNERABILITIES",
186+
"builtin": false,
187+
"projects": null,
188+
"policyLifecycleEnforcements": [
83189
{
84-
"name": "CVE-2024-24786",
85-
"severity": "MEDIUM",
86-
"fixedVersion": "1.33.0",
87-
"source": "https://github.com/advisories/GHSA-8r3f-844c-mc37",
88-
"description": null,
89-
"score": null,
90-
"exploitabilityScore": null,
91-
"cvssV3Metrics": null,
92-
"cvssV2Metrics": null,
93-
"hasExploit": false,
94-
"hasCisaKevExploit": false,
95-
"cisaKevReleaseDate": null,
96-
"cisaKevDueDate": null,
97-
"epssProbability": null,
98-
"epssPercentile": null,
99-
"epssSeverity": null,
100-
"weightedSeverity": null,
101-
"publishDate": null,
102-
"fixPublishDate": null,
103-
"gracePeriodEnd": null,
104-
"gracePeriodRemainingHours": null,
105-
"failedPolicyMatches": null,
106-
"finding": null
190+
"enforcementMethod": "BLOCK",
191+
"deploymentLifecycle": "CLI",
192+
"enforcementConfig": null
107193
}
108194
],
109-
"detectionMethod": "LIBRARY",
110-
"layerMetadata": null,
111-
"failedPolicyMatches": []
195+
"ignoreRules": null,
196+
"lifecycleTargets": null,
197+
"Default": false,
198+
"params": {
199+
"__typename": "cicdscanpolicyparamsvulnerabilities",
200+
"severity": "HIGH",
201+
"packageCountThreshold": 1,
202+
"ignoreUnfixed": true,
203+
"packageAllowList": [],
204+
"detectionMethods": [
205+
"PACKAGE",
206+
"LIBRARY",
207+
"FILE_PATH"
208+
],
209+
"vulnerabilities": [],
210+
"fixGracePeriodHours": 0,
211+
"publishGracePeriodHours": 0
212+
}
112213
}
113-
],
114-
"applications": null,
115-
"cpes": null,
116-
"secrets": null,
117-
"dataFindings": null,
118-
"vulnerableSBOMArtifactsByNameVersion": null,
119-
"hostConfiguration": null,
120-
"failedPolicyMatches": [],
121-
"analytics": {
122-
"vulnerabilities": {
123-
"infoCount": 0,
124-
"lowCount": 0,
125-
"mediumCount": 4,
126-
"highCount": 2,
127-
"criticalCount": 0,
128-
"unfixedCount": 0,
129-
"totalCount": 0
130-
},
131-
"secrets": {
132-
"privateKeyCount": 0,
133-
"publicKeyCount": 0,
134-
"passwordCount": 0,
135-
"certificateCount": 0,
136-
"cloudKeyCount": 0,
137-
"sshAuthorizedKeyCount": 0,
138-
"dbConnectionStringCount": 0,
139-
"gitCredentialCount": 0,
140-
"presignedURLCount": 0,
141-
"saasAPIKeyCount": 0,
142-
"totalCount": 0
143-
},
144-
"hostConfiguration": null,
145-
"filesScannedCount": 35,
146-
"directoriesScannedCount": 18
147214
}
148-
},
149-
"reportUrl": "https://app.wiz.io/findings/cicd-scans#"
150-
}
151-
215+
],
216+
"analytics": {
217+
"vulnerabilities": {
218+
"infoCount": 0,
219+
"lowCount": 0,
220+
"mediumCount": 0,
221+
"highCount": 1,
222+
"criticalCount": 0,
223+
"unfixedCount": 0,
224+
"totalCount":1
225+
},
226+
"secrets": {
227+
"privateKeyCount": 0,
228+
"publicKeyCount": 0,
229+
"passwordCount": 0,
230+
"certificateCount": 0,
231+
"cloudKeyCount": 0,
232+
"sshAuthorizedKeyCount": 0,
233+
"dbConnectionStringCount": 0,
234+
"gitCredentialCount": 0,
235+
"presignedURLCount": 0,
236+
"saasAPIKeyCount": 0,
237+
"totalCount": 0
238+
},
239+
"hostConfiguration": null,
240+
"filesScannedCount": 1035,
241+
"directoriesScannedCount": 379
242+
}
243+
},
244+
"reportUrl": "https://app.wiz.io/findings/cicd-scans#%7E%28cicd_scan%7E%27800143dd-bf4b-4ac1-adf0-7a51c6d5cfcf%29"
245+
}

0 commit comments

Comments
 (0)