Skip to content

Commit da15c85

Browse files
authored
Merge branch 'main' into feature/update_cli_2.3.19
2 parents 7519ad1 + 83a9bb1 commit da15c85

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.github/workflows/update-cli.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,3 @@ jobs:
7070
[1]: https://github.com/Checkmarx/checkmarx-ast-cli
7171
labels: cxone
7272
branch: feature/update_cli_${{ steps.checkmarx-ast-cli.outputs.release_tag }}
73-

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@CheckmarxDev/ast-cli-javascript-wrapper",
3-
"version": "0.0.128",
3+
"version": "0.0.129",
44
"description": "AST CLI Javascript wrapper",
55
"main": "dist/main/wrapper/CxWrapper.js",
66
"typings": "dist/main/wrapper/CxWrapper.d.ts",

src/main/wrapper/CxWrapper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,10 @@ export class CxWrapper {
229229
return exec.executeResultsCommandsFile(scanId, CxConstants.FORMAT_JSON, CxConstants.FORMAT_JSON_FILE, commands, this.config.pathToExecutable, fileName);
230230
}
231231

232-
async riskManagementResults(projectId: string, limit?: number): Promise<CxCommandOutput> {
232+
async riskManagementResults(projectId: string, scanId: string, limit?: number): Promise<CxCommandOutput> {
233233
const commands: string[] = [CxConstants.CMD_RESULT, CxConstants.CMD_RISK_MANAGEMENT];
234234
commands.push(CxConstants.PROJECT_ID, projectId);
235+
commands.push(CxConstants.SCAN_ID, scanId);
235236

236237
if (limit !== undefined) {
237238
commands.push(CxConstants.CMD_LIMIT, limit.toString());

src/tests/ResultTest.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ describe("Results cases",() => {
7070
it("Risk Management - Successful case", async () => {
7171
const auth = new CxWrapper(cxScanConfig);
7272
const projectId = "a5d99fa4-973d-48b5-86c7-6401487e1d52"
73+
const scanId = "068feb0f-cb8a-4f79-b9b1-e6bec009e517"
7374

7475
const cxCommandOutput: CxCommandOutput = await auth.riskManagementResults(
75-
projectId
76+
projectId, scanId
7677
);
7778

7879
const str = JSON.stringify(cxCommandOutput);
@@ -91,8 +92,11 @@ describe("Results cases",() => {
9192
it("Risk Management - With Limit", async () => {
9293
const auth = new CxWrapper(cxScanConfig);
9394
const projectId = "a5d99fa4-973d-48b5-86c7-6401487e1d52"
95+
const scanId = "068feb0f-cb8a-4f79-b9b1-e6bec009e517"
96+
9497
const cxCommandOutput: CxCommandOutput = await auth.riskManagementResults(
9598
projectId,
99+
scanId,
96100
10
97101
);
98102

0 commit comments

Comments
 (0)