debian-mirror-gitlab/doc/user/application_security/vulnerabilities/index.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

222 lines
9.9 KiB
Markdown
Raw Normal View History

2020-04-22 19:07:51 +05:30
---
2022-10-11 01:57:18 +05:30
stage: Govern
2020-07-28 23:09:34 +05:30
group: Threat Insights
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-04-22 19:07:51 +05:30
---
2022-07-23 23:45:48 +05:30
# Vulnerability Page **(ULTIMATE)**
2020-04-22 19:07:51 +05:30
2021-12-11 22:18:48 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13561) in GitLab 13.0.
2020-04-22 19:07:51 +05:30
2022-07-23 23:45:48 +05:30
Each vulnerability in a project has a Vulnerability Page, containing details of the
vulnerability. The details included vary according to the type of vulnerability.
Details of each vulnerability include:
2020-04-22 19:07:51 +05:30
2021-09-04 01:27:46 +05:30
- Description
- When it was detected
- Current status
- Available actions
- Linked issues
- Actions log
2020-04-22 19:07:51 +05:30
2021-12-11 22:18:48 +05:30
In GitLab 14.3 and later, if the scanner determined the vulnerability to be a false positive, an
alert message is included at the top of the vulnerability's page.
2021-03-11 19:13:27 +05:30
On the vulnerability's page, you can:
2020-04-22 19:07:51 +05:30
2022-07-23 23:45:48 +05:30
- [Change the vulnerability's status](#change-status-of-a-vulnerability).
- [Create an issue](#creating-an-issue-for-a-vulnerability).
- [Link issues to the vulnerability](#linking-a-vulnerability-to-issues).
- [Resolve the vulnerability](#resolve-a-vulnerability) if a solution is
2022-06-21 17:19:12 +05:30
available.
2022-05-07 20:08:51 +05:30
- [View security training specific to the detected vulnerability](#view-security-training-for-a-vulnerability).
2020-04-22 19:07:51 +05:30
2021-09-04 01:27:46 +05:30
## Vulnerability status values
2022-07-23 23:45:48 +05:30
A vulnerability's status can be:
- **Detected**: The default state for a newly discovered vulnerability. Appears as "Needs triage" in the UI.
- **Confirmed**: A user has seen this vulnerability and confirmed it to be accurate.
- **Dismissed**: A user has seen this vulnerability and dismissed it because it is not accurate or otherwise not to be resolved.
- **Resolved**: The vulnerability has been fixed or is no longer present.
2020-04-22 19:07:51 +05:30
2022-07-23 23:45:48 +05:30
Dismissed vulnerabilities are ignored if detected in subsequent scans. Resolved vulnerabilities that
are reintroduced and detected by subsequent scans have a _new_ vulnerability record created. When an
existing vulnerability is no longer detected in a project's `default` branch, you should change its
status to **Resolved**. This ensures that if it is accidentally reintroduced in a future merge, it
is reported again as a new record. You can use the Vulnerability Report's
2022-10-11 01:57:18 +05:30
[Activity filter](../vulnerability_report/index.md#activity-filter) to select all vulnerabilities that are
2022-07-23 23:45:48 +05:30
no longer detected, and change their status.
2021-11-11 11:23:49 +05:30
2022-07-23 23:45:48 +05:30
## Change status of a vulnerability
2020-04-22 19:07:51 +05:30
2022-07-23 23:45:48 +05:30
To change a vulnerability's status from its Vulnerability Page:
2020-04-22 19:07:51 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-07-23 23:45:48 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability's description.
1. From the **Status** dropdown list select a status, then select **Change status**.
1. Optionally, at the bottom of the page, add a comment to the log entry.
2021-01-03 14:25:43 +05:30
2022-07-23 23:45:48 +05:30
## Creating an issue for a vulnerability
2021-04-17 20:07:23 +05:30
From a vulnerability's page you can create an issue to track all action taken to resolve or
mitigate it.
2021-09-04 01:27:46 +05:30
You can create either:
2021-04-17 20:07:23 +05:30
- [A GitLab issue](#create-a-gitlab-issue-for-a-vulnerability) (default).
- [A Jira issue](#create-a-jira-issue-for-a-vulnerability).
Creating a Jira issue requires that
2021-04-29 21:17:54 +05:30
[Jira integration](../../../integration/jira/index.md) is enabled on the project. Note
2021-04-17 20:07:23 +05:30
that when Jira integration is enabled, the GitLab issue feature is not available.
### Create a GitLab issue for a vulnerability
2020-04-22 19:07:51 +05:30
2021-03-11 19:13:27 +05:30
To create a GitLab issue for a vulnerability:
2020-04-22 19:07:51 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-07-23 23:45:48 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability's description.
2021-03-11 19:13:27 +05:30
1. Select **Create issue**.
2020-04-22 19:07:51 +05:30
2021-06-08 01:23:25 +05:30
An issue is created in the project, pre-populated with information from the vulnerability report.
2021-03-11 19:13:27 +05:30
The issue is then opened so you can take further action.
2021-01-03 14:25:43 +05:30
2021-04-17 20:07:23 +05:30
### Create a Jira issue for a vulnerability
2021-03-11 19:13:27 +05:30
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4677) in GitLab 13.9.
2021-09-04 01:27:46 +05:30
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/283850) in GitLab 13.12.
2021-03-11 19:13:27 +05:30
Prerequisites:
2022-07-23 23:45:48 +05:30
- [Enable Jira integration](../../../integration/jira/index.md). The **Enable Jira issue creation
from vulnerabilities** option must be selected as part of the configuration.
- Each user must have a personal Jira user account with permission to create issues in the target
project.
2021-03-11 19:13:27 +05:30
To create a Jira issue for a vulnerability:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-07-23 23:45:48 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability's description.
2021-03-11 19:13:27 +05:30
1. Select **Create Jira issue**.
2022-11-25 23:54:43 +05:30
1. If you're not already logged in to Jira, sign in.
2021-03-11 19:13:27 +05:30
2021-04-17 20:07:23 +05:30
The Jira issue is created and opened in a new browser tab. The **Summary** and **Description**
fields are pre-populated from the vulnerability's details.
2021-03-11 19:13:27 +05:30
2022-07-23 23:45:48 +05:30
Unlike GitLab issues, the status of whether a Jira issue is open or closed does not display in the
GitLab user interface.
2021-03-11 19:13:27 +05:30
2022-07-23 23:45:48 +05:30
## Linking a vulnerability to issues
2021-03-11 19:13:27 +05:30
NOTE:
If Jira issue support is enabled, GitLab issues are disabled so this feature is not available.
2022-07-23 23:45:48 +05:30
You can link a vulnerability to one or more existing GitLab issues. Adding a link helps track
2021-09-04 01:27:46 +05:30
the issue that resolves or mitigates a vulnerability.
2021-03-11 19:13:27 +05:30
2021-09-04 01:27:46 +05:30
Issues linked to a vulnerability are shown in the Vulnerability Report and the vulnerability's page.
2020-04-22 19:07:51 +05:30
2021-09-04 01:27:46 +05:30
Be aware of the following conditions between a vulnerability and a linked issue:
2021-06-08 01:23:25 +05:30
2022-07-23 23:45:48 +05:30
- The vulnerability page shows related issues, but the issue page doesn't show the vulnerability
it's related to.
2021-06-08 01:23:25 +05:30
- An issue can only be related to one vulnerability at a time.
- Issues can be linked across groups and projects.
2022-07-23 23:45:48 +05:30
## Link a vulnerability to existing issues
2021-09-04 01:27:46 +05:30
To link a vulnerability to existing issues:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-07-23 23:45:48 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability's description.
2021-09-04 01:27:46 +05:30
1. In the **Linked issues** section, select the plus icon (**{plus}**).
1. For each issue to be linked, either:
- Paste a link to the issue.
- Enter the issue's ID (prefixed with a hash `#`).
1. Select **Add**.
2022-07-23 23:45:48 +05:30
The selected issues are added to the **Linked issues** section, and the linked issues counter is
updated.
2021-09-04 01:27:46 +05:30
## Resolve a vulnerability
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
For some vulnerabilities a solution is already known. In those instances, a vulnerability's page
includes a **Resolve with merge request** option.
2021-06-08 01:23:25 +05:30
2022-07-23 23:45:48 +05:30
The following scanners are supported by this feature:
2021-06-08 01:23:25 +05:30
- [Dependency Scanning](../dependency_scanning/index.md).
2022-08-27 11:52:29 +05:30
Automatic patch creation is only available for Node.js projects managed with
`yarn`. Also, Automatic patch creation is only supported when [FIPS mode](../../../development/fips_compliance.md#enable-fips-mode) is disabled.
2021-06-08 01:23:25 +05:30
- [Container Scanning](../container_scanning/index.md).
2022-07-23 23:45:48 +05:30
To resolve a vulnerability, you can either:
- [Resolve a vulnerability with a merge request](#resolve-a-vulnerability-with-a-merge-request).
- [Resolve a vulnerability manually](#resolve-a-vulnerability-manually).
2021-09-04 01:27:46 +05:30
![Create merge request from vulnerability](img/create_mr_from_vulnerability_v13_4.png)
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
### Resolve a vulnerability with a merge request
2022-07-23 23:45:48 +05:30
To resolve the vulnerability with a merge request:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-07-23 23:45:48 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability's description.
1. From the **Resolve with merge request** dropdown list, select **Resolve with merge request**.
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
A merge request is created which applies the patch required to resolve the vulnerability.
Process the merge request according to your standard workflow.
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
### Resolve a vulnerability manually
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
To manually apply the patch that GitLab generated for a vulnerability:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-07-23 23:45:48 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability's description.
1. From the **Resolve with merge request** dropdown list, select **Download patch to resolve**.
2021-06-08 01:23:25 +05:30
1. Ensure your local project has the same commit checked out that was used to generate the patch.
1. Run `git apply remediation.patch`.
1. Verify and commit the changes to your branch.
2022-07-23 23:45:48 +05:30
1. Create a merge request to apply the changes to your main branch.
1. Process the merge request according to your standard workflow.
2022-05-07 20:08:51 +05:30
## Enable security training for vulnerabilities
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/6176) in GitLab 14.9.
Security training helps your developers learn how to fix vulnerabilities. Developers can view security training from selected educational providers, relevant to the detected vulnerability.
To enable security training for vulnerabilities in your project:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-05-07 20:08:51 +05:30
1. On the left sidebar, select **Security & Compliance > Configuration**.
1. On the tab bar, select **Vulnerability Management**.
1. To enable a security training provider, turn on the toggle.
## View security training for a vulnerability
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/6176) in GitLab 14.9.
2022-08-13 15:12:31 +05:30
The vulnerability page may include a training link relevant to the detected vulnerability if security training is enabled.
The availability of training depends on whether the enabled training vendor has content matching the particular vulnerability.
Training content is requested based on the [vulnerability identifiers](../../../development/integrations/secure.md#identifiers).
The identifier given to a vulnerability will vary from one vulnerability to the next. The available training
content varies between vendors. This means some vulnerabilities will display no training content.
Vulnerabilities with a CWE are most likely to return a training result.
2022-05-07 20:08:51 +05:30
To view the security training for a vulnerability:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2022-05-07 20:08:51 +05:30
1. On the left sidebar, select **Security & Compliance > Vulnerability report**.
1. Select the vulnerability for which you want to view security training.
1. Select **View training**.