Skip to content

Commit 65f107d

Browse files
authored
CM-37296 - Remove SAST feature switch and enable by default (#71)
1 parent 78a6a41 commit 65f107d

File tree

10 files changed

+15
-31
lines changed

10 files changed

+15
-31
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## [Unreleased]
66

7+
## [1.9.0] - 2024-06-24
8+
9+
- Add SAST support
10+
711
## [1.8.0] - 2024-05-23
812

913
- Add "Ignore this violation" for violation card of secrets
@@ -85,6 +89,8 @@
8589

8690
The first public release of the plugin.
8791

92+
[1.9.0]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.9.0
93+
8894
[1.8.0]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.8.0
8995

9096
[1.7.0]: https://github.com/cycodehq/intellij-platform-plugin/releases/tag/v1.7.0

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginGroup = com.cycode.plugin
44
pluginName = Cycode
55
pluginRepositoryUrl = https://github.com/cycodehq/intellij-platform-plugin
66
# SemVer format -> https://semver.org
7-
pluginVersion = 1.8.0
7+
pluginVersion = 1.9.0
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 211.1

src/main/kotlin/com/cycode/plugin/Consts.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Consts {
2121
companion object {
2222
val PLUGIN_PATH = PathManager.getPluginsPath() + "/cycode-intellij-platform-plugin"
2323
val DEFAULT_CLI_PATH = getDefaultCliPath()
24-
const val REQUIRED_CLI_VERSION = "1.9.5"
24+
const val REQUIRED_CLI_VERSION = "1.10.1"
2525

2626
const val CLI_GITHUB_ORG = "cycodehq"
2727
const val CLI_GITHUB_REPO = "cycode-cli"

src/main/kotlin/com/cycode/plugin/components/settingsWindow/SettingsWindow.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class SettingsWindow {
2121
private var scanOnSaveCheckbox = JBCheckBox(null, pluginSettings.scanOnSave)
2222

2323
private var scaSyncFlowCheckbox = JBCheckBox(null, pluginSettings.scaSyncFlow)
24-
private var sastSupportCheckbox = JBCheckBox(null, pluginSettings.sastSupport)
2524

2625
fun getComponent(): DialogPanel {
2726
val contentPanel = panel {
@@ -67,11 +66,6 @@ class SettingsWindow {
6766
scaSyncFlowCheckbox()
6867
}
6968
}
70-
row(label = CycodeBundle.message("settingsSastSupportCheckbox")) {
71-
cell {
72-
sastSupportCheckbox()
73-
}
74-
}
7569
}
7670
}
7771

@@ -87,7 +81,6 @@ class SettingsWindow {
8781
cliAdditionalParamsTextField.text,
8882
scanOnSaveCheckbox.isSelected,
8983
scaSyncFlowCheckbox.isSelected,
90-
sastSupportCheckbox.isSelected,
9184
)
9285
}
9386

src/main/kotlin/com/cycode/plugin/components/toolWindow/components/cycodeActionToolBar/actions/RunAllAction.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.cycode.plugin.components.toolWindow.components.cycodeActionToolBar.a
33
import com.cycode.plugin.CycodeBundle
44
import com.cycode.plugin.components.toolWindow.CycodeContentTab
55
import com.cycode.plugin.services.cycode
6-
import com.cycode.plugin.services.pluginSettings
76
import com.cycode.plugin.services.pluginState
87
import com.intellij.icons.AllIcons
98
import com.intellij.openapi.actionSystem.AnActionEvent
@@ -27,10 +26,7 @@ class RunAllAction :
2726
service.startSecretScanForCurrentProject()
2827
service.startScaScanForCurrentProject()
2928
service.startIacScanForCurrentProject()
30-
31-
if (pluginSettings().sastSupport) {
32-
service.startSastScanForCurrentProject()
33-
}
29+
service.startSastScanForCurrentProject()
3430
}
3531

3632
override fun update(e: AnActionEvent) {

src/main/kotlin/com/cycode/plugin/components/toolWindow/components/scanContentTab/ScanContentTab.kt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import com.cycode.plugin.CycodeBundle
44
import com.cycode.plugin.components.Component
55
import com.cycode.plugin.components.common.createClickableLabel
66
import com.cycode.plugin.services.CycodeService
7-
import com.cycode.plugin.services.pluginSettings
87
import com.intellij.util.ui.JBUI
98
import java.awt.GridBagConstraints
109
import java.awt.GridBagLayout
@@ -43,14 +42,11 @@ class ScanContentTab : Component<CycodeService>() {
4342
addActionListener { service.startIacScanForCurrentProject() }
4443
},
4544
)
46-
47-
if (pluginSettings().sastSupport) {
48-
addComponentToPanel(
49-
JButton(CycodeBundle.message("scanTabSastBtn")).apply {
50-
addActionListener { service.startSastScanForCurrentProject() }
51-
},
52-
)
53-
}
45+
addComponentToPanel(
46+
JButton(CycodeBundle.message("scanTabSastBtn")).apply {
47+
addActionListener { service.startSastScanForCurrentProject() }
48+
},
49+
)
5450

5551
addComponentToPanel(createClickableLabel(CycodeBundle.message("scanTabOnSaveTip")))
5652
addComponentToPanel(createClickableLabel(CycodeBundle.message("howToUseLabel")))

src/main/kotlin/com/cycode/plugin/components/toolWindow/components/treeView/components/detectionNodeContextMenu/DetectionNodeContextMenu.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import com.cycode.plugin.components.toolWindow.components.treeView.TreeView
55
import com.cycode.plugin.components.toolWindow.components.treeView.nodes.*
66
import com.cycode.plugin.components.toolWindow.components.treeView.openDetectionInFile
77
import com.cycode.plugin.services.cycode
8-
import com.cycode.plugin.services.pluginSettings
98
import com.intellij.openapi.editor.actions.ContentChooser.RETURN_SYMBOL
109
import com.intellij.openapi.project.Project
1110
import com.intellij.openapi.ui.popup.JBPopupFactory
@@ -73,9 +72,7 @@ class DetectionNodeContextMenu(
7372
CycodeBundle.message("secretDisplayName") -> service.startSecretScanForCurrentProject()
7473
CycodeBundle.message("scaDisplayName") -> service.startScaScanForCurrentProject()
7574
CycodeBundle.message("iacDisplayName") -> service.startIacScanForCurrentProject()
76-
CycodeBundle.message("sastDisplayName") -> {
77-
if (pluginSettings().sastSupport) service.startSastScanForCurrentProject()
78-
}
75+
CycodeBundle.message("sastDisplayName") -> service.startSastScanForCurrentProject()
7976
}
8077
}
8178

src/main/kotlin/com/cycode/plugin/services/CycodePersistentSettingsService.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class CycodePersistentSettingsService : PersistentStateComponent<CycodePersisten
2121
var scanOnSave: Boolean = true
2222

2323
var scaSyncFlow: Boolean = true
24-
var sastSupport: Boolean = false
2524

2625
override fun getState(): CycodePersistentSettingsService {
2726
return this
@@ -40,7 +39,6 @@ class CycodePersistentSettingsService : PersistentStateComponent<CycodePersisten
4039
cliAdditionalParams,
4140
scanOnSave,
4241
scaSyncFlow,
43-
sastSupport,
4442
)
4543
}
4644
}

src/main/kotlin/com/cycode/plugin/settings/ApplicationSettingsConfigurable.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class ApplicationSettingsConfigurable(val project: Project) : SearchableConfigur
5858
pluginSettings.cliAdditionalParams = newSettings.cliAdditionalParams
5959
pluginSettings.scanOnSave = newSettings.scanOnSave
6060
pluginSettings.scaSyncFlow = newSettings.scaSyncFlow
61-
pluginSettings.sastSupport = newSettings.sastSupport
6261

6362
if (isValidCliPath(newSettings.cliPath)) {
6463
pluginSettings.cliPath = newSettings.cliPath

src/main/kotlin/com/cycode/plugin/settings/Settings.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ data class Settings(
88
val cliAdditionalParams: String,
99
val scanOnSave: Boolean,
1010
val scaSyncFlow: Boolean,
11-
val sastSupport: Boolean,
1211
)

0 commit comments

Comments
 (0)