Skip to content

Commit d4b35b2

Browse files
authored
CM-37262 - Remove SAST feature switch and enable by default (#91)
1 parent 33c1486 commit d4b35b2

File tree

9 files changed

+12
-34
lines changed

9 files changed

+12
-34
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [v1.9.0]
4+
5+
- Add SAST support
6+
37
## [v1.8.0]
48

59
- Add "Ignore this violation" for violation card of secrets
@@ -65,6 +69,8 @@
6569

6670
The first stable release with the support of Secrets, SCA, TreeView, Violation Card, and more.
6771

72+
[v1.9.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.9.0
73+
6874
[v1.8.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.8.0
6975

7076
[v1.7.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.7.0

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://github.com/cycodehq/vscode-extension"
99
},
1010
"homepage": "https://cycode.com/",
11-
"version": "1.8.0",
11+
"version": "1.9.0",
1212
"publisher": "cycode",
1313
"engines": {
1414
"vscode": "^1.63.0"
@@ -69,7 +69,7 @@
6969
},
7070
{
7171
"command": "cycode.sastScanForProject",
72-
"when": "viewItem == SAST && config.cycode.experimentalSastSupport",
72+
"when": "viewItem == SAST",
7373
"group": "inline"
7474
},
7575
{
@@ -82,7 +82,7 @@
8282
},
8383
{
8484
"command": "cycode.sastScanForProject",
85-
"when": "view == scan.treeView && viewItem == SAST && config.cycode.experimentalSastSupport"
85+
"when": "view == scan.treeView && viewItem == SAST"
8686
},
8787
{
8888
"command": "cycode.scaScan",
@@ -139,11 +139,6 @@
139139
"type": "boolean",
140140
"default": true,
141141
"description": "Enable experimental SCA sync flow"
142-
},
143-
"cycode.experimentalSastSupport": {
144-
"type": "boolean",
145-
"default": false,
146-
"description": "Enable experimental SAST support"
147142
}
148143
}
149144
},

src/cli-wrapper/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export interface IConfig {
1717
envVersion: string;
1818
scanOnSaveEnabled: boolean;
1919
experimentalScaSyncFlow: boolean;
20-
experimentalSastSupport: boolean;
2120
}
2221

2322
export type CliConfig = {

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const getScanTypeDisplayName = (scanType: string): string => {
132132

133133
export const DIAGNOSTIC_CODE_SEPARATOR = '::';
134134

135-
export const REQUIRED_CLI_VERSION = '1.9.5';
135+
export const REQUIRED_CLI_VERSION = '1.10.1';
136136

137137
export const CLI_GITHUB = {
138138
OWNER: 'cycodehq',

src/providers/tree-view/constants.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as vscode from 'vscode';
22
import * as path from 'path';
33
import {TreeViewItem} from './item';
44
import {ScanType, ScanTypeDisplayName} from '../../constants';
5-
import {config} from '../../utils/config';
65

76
const _PATH_TO_RESOURCES = path.join(__filename, '..', '..', 'resources');
87
const PATH_TO_SCAN_TYPE_ICONS = path.join(_PATH_TO_RESOURCES, 'scan-type');
@@ -48,7 +47,7 @@ const getSastSectionItem = (description: string): TreeViewItem => new TreeViewIt
4847
collapsibleState: vscode.TreeItemCollapsibleState.Collapsed,
4948
scanSectionType: ScanType.Sast,
5049
customIconPath: getScanTypeIconPath(ScanType.Sast),
51-
description: config.experimentalSastSupport ? description : '(coming soon)',
50+
description: description,
5251
});
5352

5453
const getIacSectionItem = (description: string): TreeViewItem => new TreeViewItem({

src/utils/config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as vscode from 'vscode';
22
import {
3-
experimentalSastSupportProperty,
43
experimentalScaSyncFlowProperty,
54
extensionId,
65
publisherId,
@@ -70,12 +69,6 @@ export const config = {
7069
.get<boolean>(experimentalScaSyncFlowProperty);
7170
return value === undefined ? false : value;
7271
},
73-
get experimentalSastSupport(): boolean {
74-
const value = vscode.workspace
75-
.getConfiguration(extensionId)
76-
.get<boolean>(experimentalSastSupportProperty);
77-
return value === undefined ? false : value;
78-
},
7972
};
8073

8174
export const validateConfig = () => {

src/utils/texts.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export const extensionName = 'Cycode';
44
export const scanOnSaveProperty = 'scanOnSave';
55

66
export const experimentalScaSyncFlowProperty = 'experimentalScaSyncFlow';
7-
export const experimentalSastSupportProperty = 'experimentalSastSupport';
87

98
export enum StatusBarTexts {
109
ScanButton = '$(cycode-logo) Scan with Cycode',

src/views/scan/content.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default `
3636
<button id="scan-vulnerabilities-button">Scan for hardcoded secrets</button>
3737
<br />
3838
<button id="scan-package-vulnerabilities-button">Scan for package vulnerabilities</button>
39-
<br id="scan-sast-br" />
39+
<br />
4040
<button id="scan-sast-button">Scan for Code Security</button>
4141
<br />
4242
<button id="scan-iac-button">Scan for Infrastructure As Code</button>
@@ -87,12 +87,6 @@ export default `
8787
.addEventListener('click', () => {
8888
vscode.postMessage({ command: 'runOpenCycodeSettingsCommand' });
8989
});
90-
91-
window.addEventListener('message', event => {
92-
const display = event.data.isSastSupported ? 'block' : 'none';
93-
document.getElementById('scan-sast-br').style.display = display;
94-
document.getElementById('scan-sast-button').style.display = display;
95-
});
9690
</script>
9791
</body>
9892
</html>

src/views/scan/scan-view.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import * as vscode from 'vscode';
21
import {ActionCommandMapping, CycodeView} from '../cycode-view';
32
import {ExecuteCommandMessages} from '../utils';
43
import {VscodeCommands} from '../../utils/commands';
54
import content from './content';
6-
import {config} from '../../utils/config';
75

86

97
export default class ScanView extends CycodeView {
@@ -34,9 +32,4 @@ export default class ScanView extends CycodeView {
3432
];
3533
super(content, actionCommandMapping);
3634
}
37-
38-
public resolveWebviewView(webviewView: vscode.WebviewView): void {
39-
super.resolveWebviewView(webviewView);
40-
this._view?.webview.postMessage({isSastSupported: config.experimentalSastSupport});
41-
}
4235
}

0 commit comments

Comments
 (0)