Skip to content

Commit 7e1f143

Browse files
committed
added new parameter traits and risksore
1 parent c26fcef commit 7e1f143

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/results/CxResult.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ export default class CxResult {
1919
data: CxData;
2020
comments: any = {};
2121
vulnerabilityDetails:CxVulnerabilityDetails;
22+
riskScore:number;
23+
traits: { [key: string]: string } = {};
2224

23-
constructor(type: string,label: string,id: string,status: string, alternateId : string, similarityId: string,state: string,severity: string,created: string,firstFoundAt: string,foundAt: string,firstScanId:string,description: string,data: CxData,comments: any,vulnerabilityDetails: CxVulnerabilityDetails,descriptionHTML: string) {
25+
constructor(type: string,label: string,id: string,status: string, alternateId : string, similarityId: string,state: string,severity: string,created: string,firstFoundAt: string,foundAt: string,firstScanId:string,description: string,data: CxData,comments: any,vulnerabilityDetails: CxVulnerabilityDetails,descriptionHTML: string,riskScore: number,traits: { [key: string]: string } = {}) {
2426
this.type = type;
2527
this.label = label;
2628
this.id = id;
@@ -38,6 +40,8 @@ export default class CxResult {
3840
this.comments = comments;
3941
this.vulnerabilityDetails = vulnerabilityDetails;
4042
this.descriptionHTML = descriptionHTML;
43+
this.riskScore = riskScore;
44+
this.traits = traits;
4145
}
4246
}
4347

src/main/wrapper/ExecutionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export class ExecutionService {
302302
return new CxPackageData(packages.comment, packages.type, packages.url);
303303
});
304304
const data = new CxData(cxPackageData, member.data.packageIdentifier, cxScaPackageData, member.data.queryId, member.data.queryName, member.data.group, member.data.resultHash, member.data.languageName, nodes, member.data.recommendedVersion);
305-
return new CxResult(member.type, member.label, member.id, member.status, member.alternateId, member.similarityId, member.state, member.severity, member.created, member.firstFoundAt, member.foundAt, member.firstScanId, member.description, data, member.comments, cxVulnerabilityDetails, member.descriptionHTML);
305+
return new CxResult(member.type, member.label, member.id, member.status, member.alternateId, member.similarityId, member.state, member.severity, member.created, member.firstFoundAt, member.foundAt, member.firstScanId, member.description, data, member.comments, cxVulnerabilityDetails, member.descriptionHTML,member.riskScore,member.traits);
306306
});
307307
cxCommandOutput.payload = r;
308308
} else {

0 commit comments

Comments
 (0)