Skip to content

Commit f52d0e1

Browse files
author
cx-Margarita-LevitM
committed
update CodeBashing link
1 parent 5ee57aa commit f52d0e1

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

checkmarx-ast-cli.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.38
1+
2.3.38-update-ai-gen-wrapper

src/main/codebashing/CxCodeBashing.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
export default class CxCodeBashing {
22
path: string;
3-
cweId: string;
4-
language: string;
5-
queryName: string;
63

74
static parseCodeBashing(resultObject: any[]): CxCodeBashing[] {
85
let codeBashingLink: CxCodeBashing[] = [];
96
codeBashingLink = resultObject.map((member: any) => {
107
const codeBashing = new CxCodeBashing();
118
codeBashing.path = member.path;
12-
codeBashing.cweId = member.cwe_id;
13-
codeBashing.language = member.lang;
14-
codeBashing.queryName = member.cxQueryName;
159
return codeBashing;
1610
});
1711
return codeBashingLink;

src/main/wrapper/CxConstants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ export enum CxConstants {
107107
KICS_REMEDIATION_TYPE = "CxKicsRemediation",
108108
BFL_TYPE = "CxBFL",
109109
SAST = "sast",
110-
LANGUAGE = "--language",
111-
VULNERABILITY_TYPE = "--vulnerability-type",
112-
CWE_ID = "--cwe-id",
113110
SEVERITY_HIGH = "high",
114111
SEVERITY_MEDIUM = "medium",
115112
STATE_CONFIRMED = "confirmed",

src/main/wrapper/CxWrapper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ export class CxWrapper {
358358
return await exec.executeCommands(this.config.pathToExecutable, commands);
359359
}
360360

361-
async codeBashingList(cweId: string, language: string, queryName: string): Promise<CxCommandOutput> {
362-
const commands: string[] = [CxConstants.CMD_RESULT, CxConstants.CMD_CODE_BASHING, CxConstants.LANGUAGE, language, CxConstants.VULNERABILITY_TYPE, queryName, CxConstants.CWE_ID, cweId];
361+
async codeBashingList(queryId: string): Promise<CxCommandOutput> {
362+
const commands: string[] = [CxConstants.CMD_RESULT, CxConstants.CMD_CODE_BASHING, CxConstants.QUERY_ID, queryId];
363363
commands.push(...this.initializeCommands(true));
364364
const exec = new ExecutionService();
365365
return await exec.executeCommands(this.config.pathToExecutable, commands, CxConstants.CODE_BASHING_TYPE);

src/tests/ResultTest.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("Results cases",() => {
6060

6161
it('Result codebashing successful case', async () => {
6262
const auth = new CxWrapper(cxScanConfig);
63-
const cxCommandOutput: CxCommandOutput = await auth.codeBashingList("79","PHP","Reflected XSS All Clients");
63+
const cxCommandOutput: CxCommandOutput = await auth.codeBashingList("8481125285487743346");
6464
expect(cxCommandOutput.payload.length).toBeGreaterThan(0);
6565
});
6666

0 commit comments

Comments
 (0)