From 8c72b7a34c11b6338fe23e0da6cee16e73f27af3 Mon Sep 17 00:00:00 2001 From: elchananarb <110327842+cx-elchanan-arbiv@users.noreply.github.com> Date: Sun, 1 Jun 2025 11:06:16 +0300 Subject: [PATCH 1/2] update cli to 2.3.21-test-resolver --- checkmarx-ast-cli.version | 2 +- src/main/osinstaller/CxInstaller.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/checkmarx-ast-cli.version b/checkmarx-ast-cli.version index 3b31fa0c..87bcb4f3 100644 --- a/checkmarx-ast-cli.version +++ b/checkmarx-ast-cli.version @@ -1 +1 @@ -2.3.21 +2.3.21-test-resolver \ No newline at end of file diff --git a/src/main/osinstaller/CxInstaller.ts b/src/main/osinstaller/CxInstaller.ts index b7c65449..63694ba7 100644 --- a/src/main/osinstaller/CxInstaller.ts +++ b/src/main/osinstaller/CxInstaller.ts @@ -22,7 +22,7 @@ export class CxInstaller { private cliVersion: string; private readonly resourceDirPath: string; private readonly installedCLIVersionFileName = 'cli-version'; - private readonly cliDefaultVersion = '2.3.21'; // Update this with the latest version. + private readonly cliDefaultVersion = '2.3.21-test-resolver'; // Update this with the latest version. private readonly client: AstClient; private static readonly PLATFORMS: Record = { From 89d4805eed0beaaa42f8a5048c5d1355e52162c0 Mon Sep 17 00:00:00 2001 From: elchananarb <110327842+cx-elchanan-arbiv@users.noreply.github.com> Date: Tue, 3 Jun 2025 11:05:31 +0300 Subject: [PATCH 2/2] check for ubuntu --- checkmarx-ast-cli.version | 2 +- src/main/osinstaller/CxInstaller.ts | 2 +- src/main/wrapper/CxWrapper.ts | 24 ++++++++++++++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/checkmarx-ast-cli.version b/checkmarx-ast-cli.version index 87bcb4f3..c0402cfd 100644 --- a/checkmarx-ast-cli.version +++ b/checkmarx-ast-cli.version @@ -1 +1 @@ -2.3.21-test-resolver \ No newline at end of file +2.3.21-test-resolver1 \ No newline at end of file diff --git a/src/main/osinstaller/CxInstaller.ts b/src/main/osinstaller/CxInstaller.ts index 63694ba7..a57e8ab6 100644 --- a/src/main/osinstaller/CxInstaller.ts +++ b/src/main/osinstaller/CxInstaller.ts @@ -22,7 +22,7 @@ export class CxInstaller { private cliVersion: string; private readonly resourceDirPath: string; private readonly installedCLIVersionFileName = 'cli-version'; - private readonly cliDefaultVersion = '2.3.21-test-resolver'; // Update this with the latest version. + private readonly cliDefaultVersion = '2.3.21-test-resolver1'; // Update this with the latest version. private readonly client: AstClient; private static readonly PLATFORMS: Record = { diff --git a/src/main/wrapper/CxWrapper.ts b/src/main/wrapper/CxWrapper.ts index d8b77df2..4f2595e3 100644 --- a/src/main/wrapper/CxWrapper.ts +++ b/src/main/wrapper/CxWrapper.ts @@ -410,17 +410,37 @@ export class CxWrapper { prepareAdditionalParams(additionalParameters: string): string[] { const params: string[] = []; + logger.info("=== prepareAdditionalParams Debug ==="); + logger.info("1. Input received: " + additionalParameters); + logger.info("2. Initial params array: " + JSON.stringify(params)); + if (!additionalParameters) { + logger.info("3. No additional parameters provided - returning empty array"); return params; } + logger.info("4. Starting regex match process..."); const paramList = additionalParameters.match(/(?:[^\s"]+|"[^"]*")+/g); - logger.info("Additional parameters refined: " + paramList) + logger.info("5. Regex result (paramList): " + JSON.stringify(paramList)); + + logger.info("Additional parameters refined: " + paramList); + logger.info("6. Logger message sent with paramList"); + if (paramList) { - paramList.forEach((element) => { + logger.info("7. paramList exists, starting forEach loop..."); + paramList.forEach((element, index) => { + logger.info("8." + (index + 1) + ". Processing element: " + element); params.push(element); + logger.info("8." + (index + 1) + ". params array after push: " + JSON.stringify(params)); }); + logger.info("9. forEach completed"); + } else { + logger.info("7. paramList is null/undefined - skipping forEach"); } + + logger.info("10. Final params array: " + JSON.stringify(params)); + logger.info("=== End Debug ==="); + return params; }