Skip to content

Commit 2d227be

Browse files
authored
CM-43066 - Add the "Ignore this violation" button for violation card of SCA (#122)
1 parent 77950fa commit 2d227be

File tree

13 files changed

+74
-27
lines changed

13 files changed

+74
-27
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.14.0]
6+
7+
- Add the "Ignore this violation" button for violation card of SCA
8+
- Add support of `.gitignore` files for a file excluding from scans
9+
510
## [v1.13.1]
611

712
- Improve suggested AI fix rendering in violation cards
@@ -130,6 +135,8 @@
130135

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

138+
[v1.14.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.14.0
139+
133140
[v1.13.1]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.13.1
134141

135142
[v1.13.0]: https://github.com/cycodehq/vscode-extension/releases/tag/v1.13.0
@@ -178,4 +185,4 @@ The first stable release with the support of Secrets, SCA, TreeView, Violation C
178185

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

181-
[Unreleased]: https://github.com/cycodehq/vscode-extension/compare/v1.13.1...HEAD
188+
[Unreleased]: https://github.com/cycodehq/vscode-extension/compare/v1.14.0...HEAD

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cycode",
33
"displayName": "Cycode",
4-
"version": "1.13.1",
4+
"version": "1.14.0",
55
"publisher": "cycode",
66
"description": "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.",
77
"repository": {

src/cli/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export enum CliCommands {
1212
export enum CommandParameters {
1313
OutputFormatJson = '--output=json',
1414
ByRule = '--by-rule',
15+
ByCve = '--by-cve',
1516
ByValue = '--by-value',
1617
ByPath = '--by-path',
1718
UserAgent = '--user-agent',

src/cli/models/cli-ignore-type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export enum CliIgnoreType {
22
Value,
33
Path,
44
Rule,
5+
Cve,
56
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ export class ScaDetectionDetailsAlert {
44
description: string;
55
vulnerableRequirements?: string;
66
firstPatchedVersion?: string;
7+
cveIdentifier?: string;
78
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class SecretDetectionDetails extends ScanDetectionDetailsBase {
1717
customRemediationGuidelines?: string;
1818
policyDisplayName?: string;
1919
@Exclude({ toPlainOnly: true })
20-
detectedValue?: string | null; // this field is used and exist only in IDE
20+
detectedValue?: string; // this field is used and exist only in IDE
2121

2222
public getFilepath(): string {
2323
return `${this.filePath}${this.fileName}`;

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const getScanTypeDisplayName = (scanType: string): string => {
128128
return _SCAN_TYPE_TO_DISPLAY_NAME[scanType];
129129
};
130130

131-
export const REQUIRED_CLI_VERSION = '2.1.0';
131+
export const REQUIRED_CLI_VERSION = '2.2.0';
132132

133133
export const CLI_GITHUB = {
134134
OWNER: 'cycodehq',

src/services/cli-download-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export class CliDownloadService implements ICliDownloadService {
237237

238238
async getExecutableAsset(): Promise<GitHubReleaseAsset | undefined> {
239239
const releaseInfo = await this.getGitHubLatestRelease();
240-
if (releaseInfo == undefined) {
240+
if (releaseInfo?.assets == undefined) {
241241
this.logger.warn('Failed to get latest release info');
242242
return undefined;
243243
}
@@ -304,7 +304,7 @@ export class CliDownloadService implements ICliDownloadService {
304304

305305
async getRemoteChecksumFile(forceRefresh = false): Promise<string | undefined> {
306306
const releaseInfo = await this.getGitHubLatestRelease(forceRefresh);
307-
if (releaseInfo == undefined) {
307+
if (releaseInfo?.assets == undefined) {
308308
this.logger.warn('Failed to get latest release info');
309309
return undefined;
310310
}

src/services/cli-service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ export class CliService implements ICliService {
185185
return CommandParameters.ByPath;
186186
case CliIgnoreType.Path:
187187
return CommandParameters.ByRule;
188+
case CliIgnoreType.Cve:
189+
return CommandParameters.ByCve;
188190
default:
189191
throw new Error('Invalid CliIgnoreType');
190192
}

src/services/cycode-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class CycodeService implements ICycodeService {
5454
} catch (error: unknown) {
5555
captureException(error);
5656
if (error instanceof Error) {
57-
this.logger.error(`Error during progress: ${error.message}`);
57+
this.logger.error(`Error during progress: ${error.message}. FN: ${fn}`);
5858
vscode.window.showErrorMessage(`Cycode error: ${error.message}`);
5959
}
6060
} finally {

0 commit comments

Comments
 (0)