Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ jobs:
unit-tests:
runs-on: cx-public-ubuntu-x64
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v6
with:
persist-credentials: false
- name: Verify single lockfile (Step 0 - Supply Chain Policy)
run: |
if [ -f yarn.lock ] && [ -f package-lock.json ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false

- name: Verify single lockfile (Step 0 - Supply Chain Policy)
run: |
Expand Down
218 changes: 119 additions & 99 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@Checkmarx/ast-cli-javascript-wrapper-runtime-cli",
"version": "1.0.37",
"version": "1.0.38",
"description": "AST CLI Javascript wrapper runtime CLI",
"main": "dist/main/wrapper/CxWrapper.js",
"typings": "dist/main/wrapper/CxWrapper.d.ts",
Expand Down Expand Up @@ -64,7 +64,8 @@
"underscore": "^1.13.8",
"picomatch": "^2.3.2",
"brace-expansion": "^2.1.2",
"uuid": "^8.3.2"
"uuid": "^3.3.2"

},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
Expand Down
23 changes: 12 additions & 11 deletions src/tests/ResultTest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {CxCommandOutput} from "../main/wrapper/CxCommandOutput";
import {BaseTest} from "./BaseTest";
import * as fs from "fs";
import CxWrapperFactory from "../main/wrapper/CxWrapperFactory";
import {CxParamType} from "../main/wrapper/CxParamType";

const cxWrapperFactory = new CxWrapperFactory();

Expand Down Expand Up @@ -29,18 +30,18 @@ describe("Results cases",() => {

it('Result List Successful case', async () => {
const auth = await cxWrapperFactory.createWrapper(cxScanConfig);
const scanList: CxCommandOutput = await auth.scanList("statuses=Completed");
let output;
while (!output && scanList && scanList.payload && scanList.payload.length > 0) {
const scanId = scanList.payload.pop().id;
console.log("Triage Successful case - ScanId " + scanId);
output = await auth.getResultsList(scanId);
if (output.status == "Error in the json file.") {
output = undefined;
}
}
const params = new Map();
params.set(CxParamType.PROJECT_NAME, "ast-cli-javascript-integration-success");
params.set(CxParamType.S, "./tsc/tests/data");
params.set(CxParamType.FILTER, "*.py");
params.set(CxParamType.BRANCH, "master");
params.set(CxParamType.SCAN_TYPES, "sast");
const scanCreateOutput: CxCommandOutput = await auth.scanCreate(params);
const scanId = scanCreateOutput.payload.pop().id;

const output = await auth.getResultsList(scanId);
expect(output.status).toBeUndefined();
expect(output.payload.length).toBeGreaterThanOrEqual(0);
expect(output.payload.length).toBeGreaterThan(0);
});

it('Result summary html file generation successful case', async () => {
Expand Down
141 changes: 25 additions & 116 deletions src/tests/data/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/tests/data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,9 @@
"minimatch": "^9.0.0",
"undici": ">=6.21.3",
"picomatch": "^2.3.2",
"brace-expansion": "^2.0.3"
"brace-expansion": "^2.0.3",
"uuid": "^9.0.0"

},
"displayName": "Checkmarx",
"engines": {
Expand Down
Loading