Commit 9e188ef0 authored by David Kim's avatar David Kim

Merge branch...

Merge branch '299209-doc-updates-for-jira-issue-creation-configuration-for-vulnerabilities' into 'master'

Doc updates for JIRA issue integration for vulnerabilities

See merge request gitlab-org/gitlab!54182
parents 14ffd8d4 cc996a3e
...@@ -14,7 +14,7 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -14,7 +14,7 @@ class Projects::ServicesController < Projects::ApplicationController
before_action only: :edit do before_action only: :edit do
push_frontend_feature_flag(:jira_issues_integration, @project, type: :licensed, default_enabled: true) push_frontend_feature_flag(:jira_issues_integration, @project, type: :licensed, default_enabled: true)
push_frontend_feature_flag(:jira_vulnerabilities_integration, @project, type: :licensed, default_enabled: true) push_frontend_feature_flag(:jira_vulnerabilities_integration, @project, type: :licensed, default_enabled: true)
push_frontend_feature_flag(:jira_for_vulnerabilities, @project, type: :development, default_enabled: false) push_frontend_feature_flag(:jira_for_vulnerabilities, @project, type: :development, default_enabled: :yaml)
end end
respond_to :html respond_to :html
......
...@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46982 ...@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46982
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/276893 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/276893
type: development type: development
group: group::threat insights group: group::threat insights
default_enabled: false default_enabled: true
...@@ -141,12 +141,12 @@ reports are available to download. To download a report, click on the ...@@ -141,12 +141,12 @@ reports are available to download. To download a report, click on the
> Introduced in [GitLab Ultimate](https://about.gitlab.com/pricing/) 10.8. > Introduced in [GitLab Ultimate](https://about.gitlab.com/pricing/) 10.8.
Each security vulnerability in the merge request report or the Each security vulnerability in the merge request report or the
[Security Dashboard](security_dashboard/index.md) is actionable. Click an entry to view detailed [Vulnerability Report](vulnerability_report/index.md) is actionable. Click an entry to view detailed
information with several options: information with several options:
- [Dismiss vulnerability](#dismissing-a-vulnerability): Dismissing a vulnerability styles it in - [Dismiss vulnerability](#dismissing-a-vulnerability): Dismissing a vulnerability styles it in
strikethrough. strikethrough.
- [Create issue](#creating-an-issue-for-a-vulnerability): Create a new issue with the title and - [Create issue](vulnerabilities/index.md#create-a-gitlab-issue-for-a-vulnerability): Create a new issue with the title and
description pre-populated with information from the vulnerability report. By default, such issues description pre-populated with information from the vulnerability report. By default, such issues
are [confidential](../project/issues/confidential_issues.md). are [confidential](../project/issues/confidential_issues.md).
- [Automatic Remediation](#automatic-remediation-for-vulnerabilities): For some vulnerabilities, - [Automatic Remediation](#automatic-remediation-for-vulnerabilities): For some vulnerabilities,
...@@ -265,29 +265,18 @@ Pressing the "Dismiss Selected" button dismisses all the selected vulnerabilitie ...@@ -265,29 +265,18 @@ Pressing the "Dismiss Selected" button dismisses all the selected vulnerabilitie
![Multiple vulnerability dismissal](img/multi_select_v12_9.png) ![Multiple vulnerability dismissal](img/multi_select_v12_9.png)
### Creating an issue for a vulnerability ### Create an issue for a vulnerability
You can create an issue for a vulnerability by visiting the vulnerability's page and clicking You can create a GitLab issue, or a Jira issue (if it's enabled) for a vulnerability. For more
**Create issue**, which you can find in the **Related issues** section. details, see [Vulnerability Pages](vulnerabilities/index.md).
![Create issue from vulnerability](img/create_issue_from_vulnerability_v13_3.png)
This creates a [confidential issue](../project/issues/confidential_issues.md) in the project the
vulnerability came from, and pre-populates it with some useful information taken from the vulnerability
report. After the issue is created, you are redirected to it so you can edit, assign, or comment on
it.
Upon returning to the group security dashboard, the vulnerability now has an associated issue next
to the name.
![Linked issue in the group security dashboard](img/issue.png)
### Automatic remediation for vulnerabilities ### Automatic remediation for vulnerabilities
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5656) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.7. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5656) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.7.
Some vulnerabilities can be fixed by applying the solution that GitLab Some vulnerabilities can be fixed by applying the solution that GitLab automatically generates.
automatically generates. Although the feature name is Automatic Remediation, this feature is also commonly called Auto-Remediation, Auto Remediation, or Suggested Solutions. The following scanners are supported: Although the feature name is Automatic Remediation, this feature is also commonly called
Auto-Remediation, Auto Remediation, or Suggested Solutions. The following scanners are supported:
- [Dependency Scanning](dependency_scanning/index.md): - [Dependency Scanning](dependency_scanning/index.md):
Automatic Patch creation is only available for Node.js projects managed with Automatic Patch creation is only available for Node.js projects managed with
......
...@@ -5,36 +5,33 @@ group: Threat Insights ...@@ -5,36 +5,33 @@ group: Threat Insights
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
--- ---
# Vulnerability Pages # Vulnerability Pages **(ULTIMATE)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13561) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.0. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13561) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.0.
Each security vulnerability in a project's [Security Dashboard](../security_dashboard/index.md#project-security-dashboard) has an individual page which includes: Each security vulnerability in a project's [Vulnerability Report](../vulnerability_report/index.md) has an individual page which includes:
- Details for the vulnerability. - Details of the vulnerability.
- The status of the vulnerability within the project. - The status of the vulnerability within the project.
- Available actions for the vulnerability. - Available actions for the vulnerability.
- Any issues related to the vulnerability. - Any issues related to the vulnerability.
On the vulnerability page, you can interact with the vulnerability in On the vulnerability's page, you can:
several different ways:
- [Change the Vulnerability Status](#changing-vulnerability-status) - You can change the - [Change the vulnerability's status](#change-vulnerability-status).
status of a vulnerability to **Detected**, **Confirmed**, **Dismissed**, or **Resolved**. - [Create a GitLab issue](#create-a-gitlab-issue-for-a-vulnerability).
- [Create issue](#creating-an-issue-for-a-vulnerability) - Create a new issue with the - [Create a Jira issue](#create-a-jira-issue-for-a-vulnerability).
title and description pre-populated with information from the vulnerability report. - [Link issues to the vulnerability](#link-gitlab-issues-to-the-vulnerability).
By default, such issues are [confidential](../../project/issues/confidential_issues.md). - [Automatically remediate the vulnerability](#automatically-remediate-the-vulnerability), if an
- [Link issues](#link-issues-to-the-vulnerability) - Link existing issues to vulnerability. automatic solution is available.
- [Automatic remediation](#automatic-remediation-for-vulnerabilities) - For some vulnerabilities,
a solution is provided for how to fix the vulnerability automatically.
## Changing vulnerability status ## Change vulnerability status
You can switch the status of a vulnerability using the **Status** dropdown to one of You can change the status of a vulnerability using the **Status** dropdown to one of
the following values: the following values:
| Status | Description | | Status | Description |
|-----------|------------------------------------------------------------------------------------------------------------------| |-----------|----------------------------------------------------------------------------------------------------------------|
| Detected | The default state for a newly discovered vulnerability | | Detected | The default state for a newly discovered vulnerability |
| Confirmed | A user has seen this vulnerability and confirmed it to be accurate | | 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 | | Dismissed | A user has seen this vulnerability and dismissed it because it is not accurate or otherwise not to be resolved |
...@@ -43,22 +40,72 @@ the following values: ...@@ -43,22 +40,72 @@ the following values:
A timeline shows you when the vulnerability status has changed A timeline shows you when the vulnerability status has changed
and allows you to comment on a change. and allows you to comment on a change.
## Creating an issue for a vulnerability ## Create a GitLab issue for a vulnerability
You can create an issue for a vulnerability by selecting the **Create issue** button. To create a GitLab issue for a vulnerability:
This allows the user to create a [confidential issue](../../project/issues/confidential_issues.md) 1. In GitLab, go to the vulnerability's page.
in the project the vulnerability came from. Fields are pre-populated with pertinent information 1. Select **Create issue**.
from the vulnerability report. After the issue is created, GitLab redirects you to the
issue page so you can edit, assign, or comment on the issue.
## Link issues to the vulnerability An issue is created in the project, prepopulated with information from the vulnerability report.
The issue is then opened so you can take further action.
You can link one or more existing issues to the vulnerability. This allows you to ## Create a Jira issue for a vulnerability
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/4677) in GitLab 13.9.
> - It's [deployed behind a feature flag](../../../user/feature_flags.md), enabled by default.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to
> [disable it](#enable-or-disable-jira-integration-for-vulnerabilities).
WARNING:
This feature might not be available to you. Check the **version history** note above for details.
Prerequisites:
- [Enable Jira integration for vulnerabilities](../../project/integrations/jira.md). Select
**Enable Jira issues creation from vulnerabilities** when configuring the integration.
To create a Jira issue for a vulnerability:
1. Go to the vulnerability's page.
1. Select **Create Jira issue**.
An issue is created in the linked Jira project, with the **Summary** and **Description** fields
pre-populated. The Jira issue is then opened in a new browser tab.
### Enable or disable Jira integration for vulnerabilities **(ULTIMATE SELF)**
The option to create a Jira issue for a vulnerability is under development but ready for production
use. It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can opt to disable it.
To enable it:
```ruby
Feature.enable(:jira_for_vulnerabilities)
```
To disable it:
```ruby
Feature.disable(:jira_for_vulnerabilities)
```
## Link GitLab issues to the vulnerability
NOTE:
If Jira issue support is enabled, GitLab issues are disabled so this feature is not available.
You can link one or more existing GitLab issues to the vulnerability. This allows you to
indicate that this vulnerability affects multiple issues. It also allows you to indicate indicate that this vulnerability affects multiple issues. It also allows you to indicate
that the resolution of one issue would resolve multiple vulnerabilities. that the resolution of one issue would resolve multiple vulnerabilities.
## Automatic remediation for vulnerabilities Linked issues are shown in the Vulnerability Report and the vulnerability's page.
## Automatically remediate the vulnerability
You can fix some vulnerabilities by applying the solution that GitLab automatically You can fix some vulnerabilities by applying the solution that GitLab automatically
generates for you. [Read more about the automatic remediation for vulnerabilities feature](../index.md#automatic-remediation-for-vulnerabilities). generates for you. [Read more about the automatic remediation for vulnerabilities feature](../index.md#automatic-remediation-for-vulnerabilities).
...@@ -37,18 +37,12 @@ The Activity filter behaves differently from the other Vulnerability Report filt ...@@ -37,18 +37,12 @@ The Activity filter behaves differently from the other Vulnerability Report filt
Clicking any vulnerability in the table takes you to its Clicking any vulnerability in the table takes you to its
[vulnerability details](../vulnerabilities) page to see more information on that vulnerability. [vulnerability details](../vulnerabilities) page to see more information on that vulnerability.
To create an issue associated with the vulnerability, click the **Create Issue** button. The **Activity** column indicates the number of issues that have been created for the vulnerability.
Hover over an **Activity** entry and select a link go to that issue.
![Create an issue for the vulnerability](img/vulnerability_details_create_issue_v13_7.png)
After you create the issue, the linked issue icon in the vulnerability list:
- Indicates that an issue has been created for that vulnerability.
- Shows a tooltip that contains a link to the issue.
![Display attached issues](img/vulnerability_list_table_v13_9.png) ![Display attached issues](img/vulnerability_list_table_v13_9.png)
Contents of the unfiltered vulnerability report can be exported using our [export feature](#export-vulnerabilities) Contents of the unfiltered vulnerability report can be exported using our [export feature](#export-vulnerabilities).
You can also dismiss vulnerabilities in the table: You can also dismiss vulnerabilities in the table:
......
...@@ -32,7 +32,8 @@ completed in GitLab and: ...@@ -32,7 +32,8 @@ completed in GitLab and:
- The Jira issue shows the status of the deployment (in the sidebar as "deployments"). - The Jira issue shows the status of the deployment (in the sidebar as "deployments").
- Create or modify a feature flag that mentions a Jira issue in its description: - Create or modify a feature flag that mentions a Jira issue in its description:
- The Jira issue shows the details of the feature-flag (in the sidebar as "feature flags"). - The Jira issue shows the details of the feature-flag (in the sidebar as "feature flags").
- View a list of Jira issues directly in GitLab **(PREMIUM)** - View a list of Jira issues directly in GitLab. **(PREMIUM)**
- Create a Jira issue from a vulnerability. **(ULTIMATE)**
Additional features provided by the Jira Development Panel integration include: Additional features provided by the Jira Development Panel integration include:
...@@ -90,37 +91,52 @@ Atlassian cloud, an **email and API token** are required. For more information, ...@@ -90,37 +91,52 @@ Atlassian cloud, an **email and API token** are required. For more information,
> to enable Basic Auth. The cookie being added to each request is `OBBasicAuth` with > to enable Basic Auth. The cookie being added to each request is `OBBasicAuth` with
> a value of `fromDialog`. > a value of `fromDialog`.
To enable the Jira integration in a project, navigate to the To enable the Jira integration in a project:
[Integrations page](overview.md#accessing-integrations) and click
the **Jira** service.
Select **Enable integration**. 1. Go to the project's [Integrations page](overview.md#accessing-integrations) and select the
**Jira** service.
Select a **Trigger** action. This determines whether a mention of a Jira issue in GitLab commits, merge requests, or both, should link the Jira issue back to that source commit/MR and transition the Jira issue, if indicated. 1. Select **Enable integration**.
To include a comment on the Jira issue when the above reference is made in GitLab, check **Enable comments**. 1. Select **Trigger** actions.
This determines whether a mention of a Jira issue in GitLab commits, merge requests, or both,
should link the Jira issue back to that source commit/MR and transition the Jira issue, if
indicated.
Enter the further details on the page as described in the following table. 1. To include a comment on the Jira issue when the above reference is made in GitLab, select
**Enable comments**.
| Field | Description | 1. Select the **Comment detail**: **Standard** or **All details**.
| ----- | ----------- |
| `Web URL` | The base URL to the Jira instance web interface which is being linked to this GitLab project. For example, `https://jira.example.com`. |
| `Jira API URL` | The base URL to the Jira instance API. Web URL value is used if not set. For example, `https://jira-api.example.com`. Leave this field blank (or use the same value of `Web URL`) if using **Jira on Atlassian cloud**. |
| `Username or Email` | Created in [configure Jira](#configure-jira) step. Use `username` for **Jira Server** or `email` for **Jira on Atlassian cloud**. |
| `Password/API token` |Created in [configure Jira](#configure-jira) step. Use `password` for **Jira Server** or `API token` for **Jira on Atlassian cloud**. |
| `Jira workflow transition IDs` | Required for closing Jira issues via commits or merge requests. These are the IDs of transitions in Jira that move issues to a particular state. (See [Obtaining a transition ID](#obtaining-a-transition-id).) If you insert multiple transition IDs separated by `,` or `;`, the issue is moved to each state, one after another, using the given order. In GitLab 13.6 and earlier, field was called `Transition ID`. |
To enable users to view Jira issues inside the GitLab project, select **Enable Jira issues** and enter a Jira project key. **(PREMIUM)** 1. Enter the further details on the page as described in the following table.
You can only display issues from a single Jira project within a given GitLab project. | Field | Description |
| ----- | ----------- |
| `Web URL` | The base URL to the Jira instance web interface which is being linked to this GitLab project. For example, `https://jira.example.com`. |
| `Jira API URL` | The base URL to the Jira instance API. Web URL value is used if not set. For example, `https://jira-api.example.com`. Leave this field blank (or use the same value of `Web URL`) if using **Jira on Atlassian cloud**. |
| `Username or Email` | Created in [configure Jira](#configure-jira) step. Use `username` for **Jira Server** or `email` for **Jira on Atlassian cloud**. |
| `Password/API token` | Created in [configure Jira](#configure-jira) step. Use `password` for **Jira Server** or `API token` for **Jira on Atlassian cloud**. |
| `Jira workflow transition IDs` | Required for closing Jira issues via commits or merge requests. These are the IDs of transitions in Jira that move issues to a particular state. (See [Obtaining a transition ID](#obtaining-a-transition-id).) If you insert multiple transition IDs separated by `,` or `;`, the issue is moved to each state, one after another, using the given order. In GitLab 13.6 and earlier, field was called `Transition ID`. |
WARNING: 1. To enable users to view Jira issues inside the GitLab project, select **Enable Jira issues** and
If you enable Jira issues with the setting above, all users that have access to this GitLab project enter a Jira project key. **(PREMIUM)**
are able to view all issues from the specified Jira project.
When you have configured all settings, click **Test settings and save changes**. You can only display issues from a single Jira project within a given GitLab project.
Your GitLab project can now interact with all Jira projects in your instance and the project now displays a Jira link that opens the Jira project. WARNING:
If you enable Jira issues with the setting above, all users that have access to this GitLab project
are able to view all issues from the specified Jira project.
1. To enable creation of issues for vulnerabilities, select **Enable Jira issues creation from vulnerabilities**.
1. Select the **Jira issue type**. If the dropdown is empty, select refresh (**{retry}**) and try again.
1. To verify the Jira connection is working, select **Test settings**.
1. Select **Save changes**.
Your GitLab project can now interact with all Jira projects in your instance and the project now
displays a Jira link that opens the Jira project.
#### Obtaining a transition ID #### Obtaining a transition ID
......
...@@ -53,3 +53,4 @@ time. ...@@ -53,3 +53,4 @@ time.
| Record Jira time tracking information against an issue | No | Yes. Time can be specified via Jira Smart Commits. | | Record Jira time tracking information against an issue | No | Yes. Time can be specified via Jira Smart Commits. |
| Transition or close a Jira issue with a Git commit or merge request | Yes. Only a single transition type, typically configured to close the issue by setting it to Done. | Yes. Transition to any state using Jira Smart Commits. | | Transition or close a Jira issue with a Git commit or merge request | Yes. Only a single transition type, typically configured to close the issue by setting it to Done. | Yes. Transition to any state using Jira Smart Commits. |
| Display a list of Jira issues | Yes **(PREMIUM)** | No | | Display a list of Jira issues | Yes **(PREMIUM)** | No |
| Create a Jira issue from a vulnerability or finding **(ULTIMATE)** | Yes | No |
...@@ -12,7 +12,7 @@ module EE ...@@ -12,7 +12,7 @@ module EE
end end
def jira_vulnerabilities_integration_available? def jira_vulnerabilities_integration_available?
feature_enabled = ::Feature.enabled?(:jira_for_vulnerabilities, parent, default_enabled: false) feature_enabled = ::Feature.enabled?(:jira_for_vulnerabilities, parent, default_enabled: :yaml)
feature_available = parent.present? ? parent&.feature_available?(:jira_vulnerabilities_integration) : License.feature_available?(:jira_vulnerabilities_integration) feature_available = parent.present? ? parent&.feature_available?(:jira_vulnerabilities_integration) : License.feature_available?(:jira_vulnerabilities_integration)
feature_enabled && feature_available feature_enabled && feature_available
......
---
title: Ability to create a Jira issue for a vulnerability
merge_request: 54182
author:
type: added
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment