Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test-resources
.npmrc
coverage/
packages/core/.npmrc
/.vscode
2 changes: 1 addition & 1 deletion packages/checkmarx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,4 @@ Find more integrations from our team [here](https://github.com/Checkmarx/ci-cd-i
[license-shield]: https://img.shields.io/github/license/Checkmarx/ast-vscode-extension.svg
[license-url]: https://github.com/Checkmarx/ast-vscode-extension/blob/master/LICENSE
[installs-vscode-url]: https://marketplace.visualstudio.com/items?itemName=checkmarx.ast-results
[installs-vscode-shield]: https://img.shields.io/visual-studio-marketplace/i/checkmarx.ast-results
[installs-vscode-shield]: https://vsmarketplacebadges.dev/installs-short/checkmarx.ast-results.svg
2 changes: 1 addition & 1 deletion packages/checkmarx/package-lock.json

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

8 changes: 4 additions & 4 deletions packages/core/package-lock.json

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

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"unit-test-core": "npx mocha"
},
"dependencies": {
"@checkmarx/ast-cli-javascript-wrapper": "0.0.159",
"@checkmarx/ast-cli-javascript-wrapper": "0.0.160",
"@popperjs/core": "^2.11.8",
"@vscode/codicons": "^0.0.36",
"axios": "1.16.0",
Expand Down
26 changes: 25 additions & 1 deletion packages/core/src/cx/cx.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as vscode from "vscode";
import * as fs from "fs";
import * as path from "path";
import { CxWrapper } from "@checkmarx/ast-cli-javascript-wrapper";
import CxScaRealtime from "@checkmarx/ast-cli-javascript-wrapper/dist/main/scaRealtime/CxScaRealTime";
import CxScan from "@checkmarx/ast-cli-javascript-wrapper/dist/main/scan/CxScan";
Expand All @@ -24,11 +26,14 @@ import { getMessages } from "../config/extensionMessages";

export class Cx implements CxPlatform {
private context: vscode.ExtensionContext;
private packageVersion: string | undefined;

constructor(context: vscode.ExtensionContext) {
this.context = context;
}



async scaScanCreate(sourcePath: string): Promise<CxScaRealtime | undefined> {
const cx = new CxWrapper(this.getBaseAstConfiguration());
let jsonResults = undefined;
Expand Down Expand Up @@ -315,10 +320,29 @@ export class Cx implements CxPlatform {
config.additionalParameters = vscode.workspace
.getConfiguration("checkmarxOne")
.get("additionalParams") as string;
config.agentName = isIDE(constants.kiroAgent) ? constants.kiroAgent : isIDE(constants.cursorAgent) ? constants.cursorAgent : (isIDE(constants.devinNextAgent) || isIDE(constants.devinAgent)) ? constants.devinAgent : (isIDE(constants.windsurfNextAgent) || isIDE(constants.windsurfAgent)) ? constants.windsurfAgent : constants.vsCodeAgent;
const agentName = isIDE(constants.kiroAgent) ? constants.kiroAgent : isIDE(constants.cursorAgent) ? constants.cursorAgent : (isIDE(constants.devinNextAgent) || isIDE(constants.devinAgent)) ? constants.devinAgent : (isIDE(constants.windsurfNextAgent) || isIDE(constants.windsurfAgent)) ? constants.windsurfAgent : constants.vsCodeAgent;
const version = this.getPackageVersion();
config.agentName = version ? `${agentName}_${version}` : agentName;
console.log(`Package version from VSCODE Plugin ${config.agentName}: ${config.agentName}`);
return config;
}

private getPackageVersion(): string {
if (this.packageVersion !== undefined) {
return this.packageVersion;
}
try {
const packageJsonPath = path.join(this.context.extensionPath, "package.json");
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
this.packageVersion = packageJson.version ?? "";
console.log(`[Cx] Resolved package version from ${packageJsonPath}: ${this.packageVersion}`);
} catch (error) {
console.error(`[Cx] Failed to read package version: ${error}`);
this.packageVersion = "";
}
return this.packageVersion;
}

async getAstConfiguration() {
const token = await this.context.secrets.get(constants.getAuthCredentialSecretKey());

Expand Down
6 changes: 3 additions & 3 deletions packages/project-ignite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</ol>
</details>

> This document relates to the standalone ​**Checkmarx Developer Assist**​ extension. Checkmarx One customers with a Developer Assist license should use the ​[**Checkmarx**](https://marketplace.visualstudio.com/items?itemName=checkmarx.ast-results) extension, which has Developer Assist bundeled together with the Checkmarx One platform tool. <br>The two extensions are **mutually exclusive**, so that if you want to use this extension, you must **first ​uninstall**​​ the Checkmarx extension.
> This document relates to the standalone ​**Checkmarx Developer Assist**​ extension. Checkmarx One customers with a Developer Assist license should use the ​[**Checkmarx**](https://marketplace.visualstudio.com/items?itemName=checkmarx.cx-dev-assist) extension, which has Developer Assist bundeled together with the Checkmarx One platform tool. <br>The two extensions are **mutually exclusive**, so that if you want to use this extension, you must **first ​uninstall**​​ the Checkmarx extension.
## Overview
Checkmarx Developer Assist delivers context-aware security guidance directly within your IDE, helping prevent vulnerabilities before they reach the pipeline. As developers write or refine AI-generated and existing code, it provides real-time detection, remediation, and actionable insights—ensuring security is built in from the start.
<br>
Expand Down Expand Up @@ -118,5 +118,5 @@ Find more integrations from our team [here](https://github.com/Checkmarx/ci-cd-i
[issues-url]: https://github.com/Checkmarx/ast-vscode-extension/issues
[license-shield]: https://img.shields.io/github/license/Checkmarx/ast-vscode-extension.svg
[license-url]: https://github.com/Checkmarx/ast-vscode-extension/blob/master/LICENSE
[installs-vscode-url]: https://marketplace.visualstudio.com/items?itemName=checkmarx.ast-results
[installs-vscode-shield]: https://img.shields.io/visual-studio-marketplace/i/checkmarx.ast-results
[installs-vscode-url]: https://marketplace.visualstudio.com/items?itemName=checkmarx.cx-dev-assist
[installs-vscode-shield]: https://vsmarketplacebadges.dev/installs-short/checkmarx.cx-dev-assist.svg
2 changes: 1 addition & 1 deletion packages/project-ignite/package-lock.json

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

Loading