Skip to content

Commit 702b5ff

Browse files
Merge pull request #362 from Checkmarx/other/AST-126977
Fix for bug AST-126977
2 parents d4974f9 + 8478c23 commit 702b5ff

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/main/java/com/checkmarx/intellij/Resource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,6 @@ public enum Resource {
153153
STARTING_CHECKMARX_OSS_SCAN,
154154
FAILED_OSS_SCAN_INITIALIZATION,
155155
DEV_ASSIST_COPY_FIX_PROMPT,
156-
DEV_ASSIST_COPY_VIEW_DETAILS_PROMPT
156+
DEV_ASSIST_COPY_VIEW_DETAILS_PROMPT,
157+
ASCA_LOGIN_REQUIRED
157158
}

src/main/java/com/checkmarx/intellij/settings/global/GlobalSettingsComponent.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ public void reset() {
182182
logoutButton.setEnabled(true);
183183
logoutButton.requestFocusInWindow();
184184
}
185-
ascaInstallationMsg.setVisible(false);
186185
SwingUtilities.invokeLater(() -> {
187186
if (useApiKey) {
188187
apiKeyField.requestFocusInWindow();
@@ -309,6 +308,9 @@ private void onAuthSuccessApiKey() {
309308

310309
// Complete post-authentication setup
311310
completeAuthenticationSetup(String.valueOf(apiKeyField.getPassword()));
311+
if (ascaCheckBox.isSelected()) {
312+
runAscaScanInBackground();
313+
}
312314
}
313315

314316
/**
@@ -537,6 +539,12 @@ private void addAscaCheckBoxListener() {
537539
}
538540

539541
private void runAscaScanInBackground() {
542+
if (!SETTINGS_STATE.isAuthenticated()) {
543+
ascaInstallationMsg.setVisible(true);
544+
setAscaInstallationMsg(Bundle.message(Resource.ASCA_LOGIN_REQUIRED), JBColor.RED);
545+
return;
546+
}
547+
540548
new SwingWorker<Void, Void>() {
541549
@Override
542550
protected Void doInBackground() {

src/main/resources/messages/CxBundle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,5 @@ CHECKING_MCP_STATUS=Checking MCP status...
147147
STARTING_CHECKMARX_OSS_SCAN=Checkmarx is scanning your code...
148148
FAILED_OSS_SCAN_INITIALIZATION=Failed to initialize Checkmarx OSS scan. Please connect to the internet.
149149
DEV_ASSIST_COPY_FIX_PROMPT=Fix prompt copied to clipboard! Paste the prompt into Copilot chat (Agent Mode).
150-
DEV_ASSIST_COPY_VIEW_DETAILS_PROMPT=Prompt asking AI to provide more details was copied to your clipboard! Paste the prompt into Copilot chat.
150+
DEV_ASSIST_COPY_VIEW_DETAILS_PROMPT=Prompt asking AI to provide more details was copied to your clipboard! Paste the prompt into Copilot chat.
151+
ASCA_LOGIN_REQUIRED=Failed to run ASCA scan: Authentication required

0 commit comments

Comments
 (0)