Skip to content

Commit ed9e9ae

Browse files
cx-miryam-foifergithub-actionscx-ben-alvoBenAlvo1
authored
Update Vorpal Name to ASCA(AST-65647) (#759)
* Update Vorpal Name to ASCA * update ast-cli to pre-release version * update ast-cli to pre-release version - 2 * Track Checkmarx CLI binaries with Git LFS * Update checkmarx-ast-cli to 2.2.6 --------- Co-authored-by: github-actions <[email protected]> Co-authored-by: AlvoBen <[email protected]> Co-authored-by: AlvoBen <[email protected]>
1 parent 3032649 commit ed9e9ae

File tree

11 files changed

+37
-37
lines changed

11 files changed

+37
-37
lines changed

checkmarx-ast-cli.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.5
1+
2.2.6

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/vorpal/VorpalScanDetail.ts renamed to src/main/asca/AscaScanDetail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default class VorpalScanDetail {
1+
export default class AscaScanDetail {
22
ruleId: number;
33
language: string;
44
ruleName: string;

src/main/vorpal/CxVorpal.ts renamed to src/main/asca/CxAsca.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import VorpalScanDetail from "./VorpalScanDetail";
1+
import AscaScanDetail from "./AscaScanDetail";
22

3-
export default class CxVorpal {
3+
export default class CxAsca {
44
requestId: string;
55
status: boolean;
66
message: string;
7-
scanDetails: VorpalScanDetail[];
7+
scanDetails: AscaScanDetail[];
88
error: any;
99

1010
constructor() {
@@ -15,16 +15,16 @@ export default class CxVorpal {
1515
this.error = null;
1616
}
1717

18-
static parseScan(resultObject: any): CxVorpal {
19-
const scan = new CxVorpal();
18+
static parseScan(resultObject: any): CxAsca {
19+
const scan = new CxAsca();
2020
scan.requestId = resultObject.request_id;
2121
scan.status = resultObject.status;
2222
scan.message = resultObject.message;
2323
scan.error = resultObject.error;
2424

2525
if (resultObject.scan_details instanceof Array) {
2626
scan.scanDetails = resultObject.scan_details.map((detail: any) => {
27-
const scanDetail = new VorpalScanDetail();
27+
const scanDetail = new AscaScanDetail();
2828
scanDetail.ruleId = detail.rule_id;
2929
scanDetail.language = detail.language;
3030
scanDetail.ruleName = detail.rule_name;

src/main/wrapper/CxConstants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export enum CxConstants {
6565
FORMAT_HTML_CLI = "summaryHTML",
6666
FILTER = "--filter",
6767
SCAN_ID = "--scan-id",
68-
CMD_VORPAL = "vorpal",
68+
CMD_ASCA = "asca",
6969
SOURCE_FILE = "--file-source",
70-
VORPAL_UPDATE_VERSION = "--vorpal-latest-version",
70+
ASCA_UPDATE_VERSION = "--asca-latest-version",
7171
PROJECT_ID = "--project-id",
7272
SIMILARITY_ID = "--similarity-id",
7373
QUERY_ID = "--query-id",
@@ -81,7 +81,7 @@ export enum CxConstants {
8181
ADDITONAL_PARAMS = "--additional-params",
8282
ENGINE = "--engine",
8383
SCAN_TYPE = "CxScan",
84-
SCAN_VORPAL = "CxVorpal",
84+
SCAN_ASCA = "CxAsca",
8585
PROJECT_TYPE = "CxProject",
8686
PREDICATE_TYPE = "CxPredicate",
8787
CODE_BASHING_TYPE = "CxCodeBashing",

src/main/wrapper/CxWrapper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ export class CxWrapper {
125125
return await exec.executeCommands(this.config.pathToExecutable, commands, CxConstants.SCAN_TYPE);
126126
}
127127

128-
async scanVorpal(sourceFile: string, updateVersion = false, agent?: string | null): Promise<CxCommandOutput> {
129-
const commands: string[] = [CxConstants.CMD_SCAN, CxConstants.CMD_VORPAL, CxConstants.SOURCE_FILE, sourceFile];
128+
async scanAsca(sourceFile: string, updateVersion = false, agent?: string | null): Promise<CxCommandOutput> {
129+
const commands: string[] = [CxConstants.CMD_SCAN, CxConstants.CMD_ASCA, CxConstants.SOURCE_FILE, sourceFile];
130130

131131
if (updateVersion) {
132-
commands.push(CxConstants.VORPAL_UPDATE_VERSION);
132+
commands.push(CxConstants.ASCA_UPDATE_VERSION);
133133
}
134134
if (agent) {
135135
commands.push(CxConstants.AGENT);
@@ -144,7 +144,7 @@ export class CxWrapper {
144144

145145
commands.push(...this.initializeCommands(false));
146146
const exec = new ExecutionService();
147-
return await exec.executeCommands(this.config.pathToExecutable, commands, CxConstants.SCAN_VORPAL);
147+
return await exec.executeCommands(this.config.pathToExecutable, commands, CxConstants.SCAN_ASCA);
148148
}
149149

150150
async scanCancel(id: string): Promise<CxCommandOutput> {

src/main/wrapper/ExecutionService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import CxKicsRemediation from "../remediation/CxKicsRemediation";
2222
import CxScaRealTime from "../scaRealtime/CxScaRealTime";
2323
import CxChat from "../chat/CxChat";
2424
import CxMask from "../mask/CxMask";
25-
import CxVorpal from "../vorpal/CxVorpal";
25+
import CxAsca from "../asca/CxAsca";
2626

2727
let skipValue = false;
2828
const fileSourceFlag = "--file-source"
@@ -200,9 +200,9 @@ export class ExecutionService {
200200
const scans = CxScan.parseProject(resultObject);
201201
cxCommandOutput.payload = scans;
202202
break;
203-
case CxConstants.SCAN_VORPAL:
204-
const vorpal = CxVorpal.parseScan(resultObject);
205-
cxCommandOutput.payload = [vorpal];
203+
case CxConstants.SCAN_ASCA:
204+
const asca = CxAsca.parseScan(resultObject);
205+
cxCommandOutput.payload = [asca];
206206
break;
207207
case CxConstants.PROJECT_TYPE:
208208
const projects = CxProject.parseProject(resultObject);

src/main/wrapper/resources/cx-linux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:6278ef630e389a6f879ae7e62faeabd881a30b2f9aa99aa4ab03ef930d56f509
3-
size 66142360
2+
oid sha256:84c22ba2aac3a10fdbcdc4a497b90b1f19cfac05903734726505f3f07d651c42
3+
size 66171032

src/main/wrapper/resources/cx-mac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:c2eab522ea2a7dbd61620b882b0957e5ebac3fc4af00993b7963385a230ad79a
3-
size 133984944
2+
oid sha256:17d7887c19d7cae0b63c62eaa7f17ef85a1726ae4e9ab62405d73346de450875
3+
size 134051856

src/main/wrapper/resources/cx.exe

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:7e0b92a2b5bfcf1368d470e016e857c7724e5cfe8bbe4c183a05f27dc36128cc
3-
size 67910536
2+
oid sha256:71cad5fe4002448c9b9af6c8f9e61edb85c182186ac834a4300ba846b26612f7
3+
size 67934600

src/tests/ScanTest.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,40 +125,40 @@ describe("ScanCreate cases", () => {
125125
expect(aiEnabled).toBeDefined();
126126
})
127127

128-
it('ScanVorpal fail case Without extensions', async () => {
128+
it('ScanAsca fail case Without extensions', async () => {
129129
const auth = new CxWrapper(cxScanConfig);
130-
const cxCommandOutput: CxCommandOutput = await auth.scanVorpal("tsc/tests/data/python-file");
130+
const cxCommandOutput: CxCommandOutput = await auth.scanAsca("tsc/tests/data/python-file");
131131
console.log(" Json object from failure case: " + JSON.stringify(cxCommandOutput));
132132

133133
expect(cxCommandOutput.payload[0].error.description).toEqual("The file name must have an extension.");
134134
expect(cxCommandOutput.exitCode).toBe(0);
135135
expect(cxCommandOutput.payload[0].status).toBeUndefined();
136136
});
137137

138-
it('ScanVorpal Successful case', async () => {
138+
it('ScanAsca Successful case', async () => {
139139
const auth = new CxWrapper(cxScanConfig);
140-
const cxCommandOutput: CxCommandOutput = await auth.scanVorpal("tsc/tests/data/python-vul-file.py");
141-
console.log("Json object from scanVorpal successful case: " + JSON.stringify(cxCommandOutput));
140+
const cxCommandOutput: CxCommandOutput = await auth.scanAsca("tsc/tests/data/python-vul-file.py");
141+
console.log("Json object from scanAsca successful case: " + JSON.stringify(cxCommandOutput));
142142
const scanObject = cxCommandOutput.payload.pop();
143143
expect(cxCommandOutput.payload).toBeDefined();
144144
expect(cxCommandOutput.exitCode).toBe(0);
145145
expect(scanObject.status).toEqual(true);
146146
});
147147

148-
it('ScanVorpal with complex name Successful case', async () => {
148+
it('ScanAsca with complex name Successful case', async () => {
149149
const auth = new CxWrapper(cxScanConfig);
150-
const cxCommandOutput: CxCommandOutput = await auth.scanVorpal("tsc/tests/data/var express = require('express';.js");
151-
console.log("Json object from scanVorpal successful case: " + JSON.stringify(cxCommandOutput));
150+
const cxCommandOutput: CxCommandOutput = await auth.scanAsca("tsc/tests/data/var express = require('express';.js");
151+
console.log("Json object from scanAsca successful case: " + JSON.stringify(cxCommandOutput));
152152
const scanObject = cxCommandOutput.payload.pop();
153153
expect(cxCommandOutput.payload).toBeDefined();
154154
expect(cxCommandOutput.exitCode).toBe(0);
155155
expect(scanObject.status).toEqual(true);
156156
});
157157

158-
it('ScanVorpal Successful case with update version', async () => {
158+
it('ScanAsca Successful case with update version', async () => {
159159
const auth = new CxWrapper(cxScanConfig);
160-
const cxCommandOutput: CxCommandOutput = await auth.scanVorpal("tsc/tests/data/python-vul-file.py", true);
161-
console.log("Json object from scanVorpal successful case with update version: " + JSON.stringify(cxCommandOutput));
160+
const cxCommandOutput: CxCommandOutput = await auth.scanAsca("tsc/tests/data/python-vul-file.py", true);
161+
console.log("Json object from scanAsca successful case with update version: " + JSON.stringify(cxCommandOutput));
162162
const scanObject = cxCommandOutput.payload.pop();
163163
expect(cxCommandOutput.payload).toBeDefined();
164164
expect(cxCommandOutput.exitCode).toBe(0);

0 commit comments

Comments
 (0)