1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <unload unload_date =" 2024-06-12 10:11:31 " >
2
+ <unload unload_date =" 2024-10-11 12:59:25 " >
3
3
<sys_script_include action =" INSERT_OR_UPDATE" >
4
4
<access >public</access >
5
5
<active >true</active >
@@ -28,8 +28,11 @@ CheckmarxOneAppVulItemProcessor.prototype = Object.extendsObject(sn_vul.Applicat
28
28
if (result_node.toString().includes("Results")) {
29
29
var listNode = doc.getNode('/scanResults/Results');
30
30
}
31
+ if (result_node.toString().includes("fixedSASTData")) {
32
+ var fixedSASTNode = doc.getNode('/scanResults/fixedSASTData');
33
+ }
31
34
if (result_node.toString().includes("fixedSCAData")) {
32
- var fixedNode = doc.getNode('/scanResults/fixedSCAData');
35
+ var fixedSCANode = doc.getNode('/scanResults/fixedSCAData');
33
36
}
34
37
35
38
} catch (ex) {
@@ -136,6 +139,7 @@ CheckmarxOneAppVulItemProcessor.prototype = Object.extendsObject(sn_vul.Applicat
136
139
queryData['source_entry_id'] = 'Checkmarx One' + "-" + node.getAttribute('id');
137
140
resultObj['source_avit_id'] = node.getAttribute('id') + node.getAttribute('package_unique_id');
138
141
resultObj['source_references'] = node.getFirstChild().getTextContent().toString();
142
+ resultObj['source_notes'] = node.getAttribute('exploitable_method').toString();
139
143
140
144
}
141
145
if (scan_type == 'kics') {
@@ -197,9 +201,9 @@ CheckmarxOneAppVulItemProcessor.prototype = Object.extendsObject(sn_vul.Applicat
197
201
198
202
}
199
203
}
200
- if (fixedNode ) {
204
+ if (fixedSCANode ) {
201
205
var fixedData = {};
202
- var sca_iter = fixedNode .getChildNodeIterator();
206
+ var sca_iter = fixedSCANode .getChildNodeIterator();
203
207
while (sca_iter.hasNext()) {
204
208
try {
205
209
var sca_node = sca_iter.next();
@@ -220,11 +224,53 @@ CheckmarxOneAppVulItemProcessor.prototype = Object.extendsObject(sn_vul.Applicat
220
224
fixedData['source_severity'] = severity;
221
225
fixedData['scan_summary_name'] = reportData.scan_summary_name;
222
226
fixedData['source_sdlc_status'] = 'Not Applicable';
223
- fixedData['package_unique_id'] = scaattributes.id;
227
+ fixedData['package_unique_id'] = ' scaattributes.id' ;
224
228
this._upsertAVIT(fixedData);
225
229
226
230
} catch (ex) {
227
- errorMessage = gs.getMessage("Error in retriving data for app vulnerability item integration!");
231
+ errorMessage = gs.getMessage("Error in processing SCA Fixed Vulnerability!");
232
+ gs.error(this.MSG + " " + errorMessage + " " + ex.message);
233
+ errorProcess += " | " + ex.message;
234
+
235
+ }
236
+ }
237
+ }
238
+
239
+ if (fixedSASTNode) {
240
+ var fixedSASTData = {};
241
+ var sast_iter = fixedSASTNode.getChildNodeIterator();
242
+ while (sast_iter.hasNext()) {
243
+ try {
244
+ var sast_node = sast_iter.next();
245
+ var sastattributes = sast_node.getAttributes();
246
+
247
+ var fixedResultHash = '';
248
+ var fixedChildIter = sast_node.getChildNodeIterator();
249
+ while (fixedChildIter.hasNext) {
250
+ var fixedChildNode = fixedChildIter.next();
251
+ if (fixedChildNode.getNodeName() == "resultHash") {
252
+ fixedResultHash = fixedChildNode.getTextContent();
253
+ break;
254
+ }
255
+ }
256
+ var fixedSimilarityId = sastattributes.id;
257
+ var fixedSimilarityIdHash = fixedSimilarityId + '_' + fixedResultHash;
258
+
259
+ var last_scan_date = new GlideDateTime(sastattributes.last_scan_date);
260
+ fixedSASTData['source_app_id'] = sastattributes.app_id;
261
+ fixedSASTData['source_scan_id'] = sastattributes.scan_id;
262
+ fixedSASTData['scan_type'] = 'static';
263
+ fixedSASTData['source_avit_id'] = fixedSimilarityIdHash;
264
+ fixedSASTData['source_entry_id'] ='Checkmarx One' + " CWE-" + sastattributes.cweId;
265
+ fixedSASTData['source_remediation_status'] = 'FIXED';
266
+ fixedSASTData['source_severity'] = sastattributes.source_severity;
267
+ fixedSASTData['scan_summary_name'] = fixedSASTData.source_scan_id + ' ' + last_scan_date;
268
+ fixedSASTData['source_sdlc_status'] = 'Not Applicable';
269
+ fixedSASTData['package_unique_id'] = sastattributes.package_unique_id;
270
+ this._upsertAVIT(fixedSASTData);
271
+
272
+ } catch (ex) {
273
+ errorMessage = gs.getMessage("Error in processing SAST Fixed Vulnerability!");
228
274
gs.error(this.MSG + " " + errorMessage + " " + ex.message);
229
275
errorProcess += " | " + ex.message;
230
276
@@ -337,13 +383,13 @@ CheckmarxOneAppVulItemProcessor.prototype = Object.extendsObject(sn_vul.Applicat
337
383
<
sys_created_by >
[email protected] </
sys_created_by >
338
384
<sys_created_on >2023-03-16 05:04:10</sys_created_on >
339
385
<sys_id >ba2b3da69769e510026f72021153af1b</sys_id >
340
- <sys_mod_count >61 </sys_mod_count >
386
+ <sys_mod_count >66 </sys_mod_count >
341
387
<sys_name >CheckmarxOneAppVulItemProcessor</sys_name >
342
388
<sys_package display_value =" Checkmarx One Vulnerability Integration" source =" x_chec3_chexone" >3d20e92d47471110328ca368436d436a</sys_package >
343
389
<sys_policy />
344
390
<sys_scope display_value =" Checkmarx One Vulnerability Integration" >3d20e92d47471110328ca368436d436a</sys_scope >
345
391
<sys_update_name >sys_script_include_ba2b3da69769e510026f72021153af1b</sys_update_name >
346
392
<sys_updated_by >admin</sys_updated_by >
347
- <sys_updated_on >2024-05-22 13:26:13 </sys_updated_on >
393
+ <sys_updated_on >2024-09-18 10:33:40 </sys_updated_on >
348
394
</sys_script_include >
349
395
</unload >
0 commit comments