diff --git a/internal/commands/result.go b/internal/commands/result.go index ed2cb4095..d0d1586a0 100644 --- a/internal/commands/result.go +++ b/internal/commands/result.go @@ -1158,7 +1158,7 @@ func filterResultsByType(results *wrappers.ScanResultsCollection, excludedTypes func filterScsResultsByAgent(results *wrappers.ScanResultsCollection, agent string) *wrappers.ScanResultsCollection { unsupportedTypesByAgent := map[string][]string{ commonParams.VSCodeAgent: {commonParams.SCSScorecardType}, - commonParams.JetbrainsAgent: {commonParams.SCSScorecardType, commonParams.SCSSecretDetectionType}, + commonParams.JetbrainsAgent: {commonParams.SCSScorecardType}, commonParams.EclipseAgent: {commonParams.SCSScorecardType, commonParams.SCSSecretDetectionType}, commonParams.VisualStudioAgent: {commonParams.SCSScorecardType, commonParams.SCSSecretDetectionType}, } diff --git a/internal/commands/result_test.go b/internal/commands/result_test.go index 5558e7153..70a6246b3 100644 --- a/internal/commands/result_test.go +++ b/internal/commands/result_test.go @@ -197,7 +197,7 @@ func TestRunScsResultsShow_VSCode_AgentShouldNotShowScorecardResults(t *testing. mock.SetScsMockVarsToDefault() } -func TestRunScsResultsShow_Other_AgentsShouldNotShowScsResults(t *testing.T) { +func TestRunScsResultsShow_Jetbrains_AgentShouldShowScsResults(t *testing.T) { clearFlags() mock.HasScs = true mock.ScsScanPartial = false @@ -206,8 +206,8 @@ func TestRunScsResultsShow_Other_AgentsShouldNotShowScsResults(t *testing.T) { execCmdNilAssertion(t, "results", "show", "--scan-id", "SCS_ONLY", "--report-format", "json", "--agent", params.JetbrainsAgent) assertTypePresentJSON(t, params.SCSScorecardType, 0) - assertTypePresentJSON(t, params.SCSSecretDetectionType, 0) - assertTotalCountJSON(t, 0) + assertTypePresentJSON(t, params.SCSSecretDetectionType, 2) + assertTotalCountJSON(t, 2) removeFileBySuffix(t, printer.FormatJSON) mock.SetScsMockVarsToDefault() diff --git a/internal/commands/scan.go b/internal/commands/scan.go index 5de62de5a..fdf20e749 100644 --- a/internal/commands/scan.go +++ b/internal/commands/scan.go @@ -1030,6 +1030,7 @@ func getResubmitConfiguration(scansWrapper wrappers.ScansWrapper, projectID, use if len(allScansModel.Scans) > 0 { scanModelResponse := allScansModel.Scans[0] + scanModelResponse.ReplaceMicroEnginesWithSCS() config = scanModelResponse.Metadata.Configs engines := scanModelResponse.Engines // Check if there are no scan types sent using the flags, and use the latest scan engine types