Skip to content

Commit 28787d7

Browse files
authored
CM-42035 - Add AI remediations for IaC and SAST (#120)
1 parent 2ef505d commit 28787d7

31 files changed

+539
-93
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
## [v1.13.0]
6+
7+
- Add AI remediations for IaC and SAST
8+
- Add code highlighting for Violation Cards
9+
510
## [v1.12.0]
611

712
- Add support for Swift Package Manager in SCA
@@ -119,6 +124,8 @@
119124

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

127+
[v1.13.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.13.0
128+
122129
[v1.12.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.12.0
123130

124131
[v1.11.2]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.11.2
@@ -163,4 +170,4 @@ The first stable release with the support of Secrets, SCA, TreeView, Violation C
163170

164171
[v1.0.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.0.0
165172

166-
[Unreleased]: https://github.com/cycodehq/vscode-extension/compare/v1.12.0...HEAD
173+
[Unreleased]: https://github.com/cycodehq/vscode-extension/compare/v1.13.0...HEAD

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cycode",
33
"displayName": "Cycode",
4-
"version": "1.12.0",
4+
"version": "1.13.0",
55
"publisher": "cycode",
66
"description": "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.",
77
"repository": {
@@ -295,6 +295,7 @@
295295
"semver": "7.5.4",
296296
"shelljs": "0.8.5",
297297
"showdown": "^2.1.0",
298+
"showdown-highlight": "^3.1.0",
298299
"tsyringe": "^4.8.0"
299300
}
300301
}

src/cli/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export enum CliCommands {
44
Path = 'path',
55
Scan = 'scan',
66
Auth = 'auth',
7-
AuthCheck = 'auth check',
87
Ignore = 'ignore',
9-
Version = 'version',
8+
Status = 'status',
9+
AiRemediation = 'ai_remediation',
1010
}
1111

1212
export enum CommandParameters {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Type } from 'class-transformer';
2+
3+
export class AiRemediationResultData {
4+
remediation: string;
5+
isFixAvailable: boolean;
6+
}
7+
8+
export class AiRemediationResult {
9+
result: boolean;
10+
message: string;
11+
@Type(() => AiRemediationResultData)
12+
data?: AiRemediationResultData;
13+
}

src/cli/models/auth-check-result.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/cli/models/scan-result/detection-base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ScanDetectionDetailsBase } from './scan-detection-details-base';
22

33
export abstract class DetectionBase {
4+
public abstract id: string;
45
public abstract severity: string;
56
public abstract detectionDetails: ScanDetectionDetailsBase;
67

src/cli/models/scan-result/iac/iac-detection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Type } from 'class-transformer';
33
import { DetectionBase } from '../detection-base';
44

55
export class IacDetection extends DetectionBase {
6+
id: string;
67
message: string;
78
@Type(() => IacDetectionDetails)
89
detectionDetails: IacDetectionDetails;

src/cli/models/scan-result/sast/sast-detection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { SastDetectionDetails } from './sast-detection-details';
33
import { DetectionBase } from '../detection-base';
44

55
export class SastDetection extends DetectionBase {
6+
id: string;
67
message: string;
78
@Type(() => SastDetectionDetails)
89
detectionDetails: SastDetectionDetails;

src/cli/models/scan-result/sca/sca-detection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { DetectionBase } from '../detection-base';
33
import { Type } from 'class-transformer';
44

55
export class ScaDetection extends DetectionBase {
6+
id: string;
67
message: string;
78
@Type(() => ScaDetectionDetails)
89
detectionDetails: ScaDetectionDetails;

src/cli/models/scan-result/secret/secret-detection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Type } from 'class-transformer';
55
const IDE_ENTRY_LINE_NUMBER = 1;
66

77
export class SecretDetection extends DetectionBase {
8+
id: string;
89
message: string;
910

1011
@Type(() => SecretDetectionDetails)

0 commit comments

Comments
 (0)