Skip to content

Commit 5a95f7a

Browse files
Fix bug https://checkmarx.atlassian.net/browse/AST-93304 , cannot scan in case of proxy (#1097)
Co-authored-by: Itay Paz <143506741+cx-itay-paz@users.noreply.github.com>
1 parent 4ea229c commit 5a95f7a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/cx/cx.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,10 @@ export class Cx implements CxPlatform {
333333
if (!token) {
334334
return enabled;
335335
}
336-
const config = new CxConfig();
336+
const config = await this.getAstConfiguration();
337+
if (!config) {
338+
return enabled;
339+
}
337340
config.apiKey = token;
338341
const cx = new CxWrapper(config);
339342
try {
@@ -353,7 +356,10 @@ export class Cx implements CxPlatform {
353356
if (!token) {
354357
return enabled;
355358
}
356-
const config = new CxConfig();
359+
const config = await this.getAstConfiguration();
360+
if (!config) {
361+
return enabled;
362+
}
357363
config.apiKey = token;
358364
const cx = new CxWrapper(config);
359365
try {

0 commit comments

Comments
 (0)