Commit d2887f4b authored by Fernando Cardenas's avatar Fernando Cardenas 🔴
Browse files

feat: Enable security findings

parent 7b41cdc2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ This extension integrates GitLab into Visual Studio Code. After you [set up the
  or build a [custom search](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/docs/user/custom-queries.md)
  to meet your needs.
- [**Create and review merge requests**](#merge-request-reviews).
- [**View security findings in your current branch**](#security-findings)
- [**Validate your GitLab CI/CD configuration**](#validate-gitlab-cicd-configuration) locally with a [command](#commands).
- [**Manage your pipelines**](#pipeline-actions). View your [pipeline status](#status-bar---details)
  and open the related merge request. With [advanced pipeline actions](#pipeline-actions),
@@ -34,7 +35,7 @@ If you face an issue, check out our [list of known issues](https://gitlab.com/gi

## Minimum supported version

This extension supports GitLab versions 13.0 and later. Even though most of the extension's features work with older versions, we currently don't actively support GitLab instances below version 13.0.
This extension supports GitLab versions 16.1 and later. Even though most of the extension's features work with older versions, we currently don't actively support GitLab instances below version 16.1.

To find your GitLab version, visit `/help` (like `https://gitlab.com/help`).

@@ -183,6 +184,12 @@ To view the output of a job directly in VS Code, on the left sidebar, select the

![view-job-output.png](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/raw/9555acfd02253cb506d2b5e50dee7fde885fbddf/docs/assets/view-job-output.png)

### Security findings

If your project includes [Secure](https://about.gitlab.com/features/?stage=secure) features, then security findings are displayed for the currently checked out branch after you've opened a merge request for that branch and scans have completed. Secure features must be [configured](https://docs.gitlab.com/ee/user/application_security/secure_your_application.html).

![_security_findings.gif](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/raw/61cbf9c85b97e874b0574507ab52a83ae8769c86/docs/assets/security_findings.gif)

### Pipeline actions

One of the real power features of this extension is pipeline actions. This feature can be accessible from the status bar by clicking the pipeline status text or command palette and allows you to,
+508 KiB
Loading image diff...
+9 −0
Original line number Diff line number Diff line
// Add your feature flag here
export enum FeatureFlag {
  SecurityScans = 'securityScansFlag',
}

// Set the feature flag default value here
export const FEATURE_FLAGS_DEFAULT_VALUES = {
  [FeatureFlag.SecurityScans]: true,
};
+10 −0
Original line number Diff line number Diff line
import { getExtensionConfiguration } from '../utils/extension_configuration';
import { FEATURE_FLAGS_DEFAULT_VALUES, FeatureFlag } from './constants';

export { FeatureFlag } from './constants';

export function isEnabled(feature: FeatureFlag): boolean {
  const featureFlagUserPreferences = getExtensionConfiguration().featureFlags;

  return { ...FEATURE_FLAGS_DEFAULT_VALUES, ...featureFlagUserPreferences }[feature];
}
+0 −3
Original line number Diff line number Diff line
import vscode from 'vscode';

// Feature Flags
export const SECURITY_SCANS_FEATURE_FLAG = 'securityScansFlag';

export const REVIEW_URI_SCHEME = 'gl-review';
export const MERGED_YAML_URI_SCHEME = 'gl-merged-ci-yaml';
export const JOB_LOG_URI_SCHEME = 'gl-job-log';
Loading