Skip to content

Commit 7abaf7e

Browse files
AST-129589 - Add dastEnabled (#952)
1 parent 66f067a commit 7abaf7e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/main/wrapper/CxConstants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export enum CxConstants {
119119
AI_GUIDED_REMEDIATION_KEY = "scan.config.plugins.aiGuidedRemediation",
120120
STANDALONE_KEY = "scan.config.plugins.cxdevassist",
121121
ASSIST_KEY = "scan.config.plugins.cxoneassist",
122+
DAST_ENABLED_KEY = "scan.config.plugins.dastenabled",
122123
AI_MCP_SERVER_KEY = "scan.config.plugins.aiMcpServer",
123124
TELEMETRY = "telemetry",
124125
SUB_CMD_TELEMETRY_AI = "ai",

src/main/wrapper/CxWrapper.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,17 @@ export class CxWrapper {
512512
return value?.toLowerCase() === "true";
513513
}
514514

515+
async dastEnabled(): Promise<boolean> {
516+
const commands: string[] = [CxConstants.CMD_UTILS, CxConstants.SUB_CMD_TENANT];
517+
commands.push(...this.initializeCommands(false));
518+
519+
const exec = new ExecutionService();
520+
const output = await exec.executeMapTenantOutputCommands(this.config.pathToExecutable, commands);
521+
522+
const value = getTrimmedMapValue(output, CxConstants.DAST_ENABLED_KEY);
523+
return value?.toLowerCase() === "true";
524+
}
525+
515526
async aiMcpServerEnabled(): Promise<boolean> {
516527
const commands: string[] = [CxConstants.CMD_UTILS, CxConstants.SUB_CMD_TENANT];
517528
commands.push(...this.initializeCommands(false));
@@ -651,4 +662,4 @@ export class CxWrapper {
651662
}
652663
return r;
653664
}
654-
}
665+
}

0 commit comments

Comments
 (0)