|
| 1 | +--- |
| 2 | +title: Linking code scanning alerts to GitHub issues |
| 3 | +shortTitle: Track alerts in issues |
| 4 | +intro: Create or connect {% data variables.product.github %} issues to {% data variables.product.prodname_code_scanning %} alerts to track security fixes in your team's workflow. |
| 5 | +permissions: People with write access for the repository can link {% data variables.product.prodname_code_scanning %} alerts to issues. |
| 6 | +versions: |
| 7 | + feature: code-scanning-link-alert-to-issue |
| 8 | +contentType: how-tos |
| 9 | +category: |
| 10 | + - Find and fix code vulnerabilities |
| 11 | +--- |
| 12 | + |
| 13 | +{% data reusables.code-scanning.alert-tracking-with-issues-preview-note %} |
| 14 | + |
| 15 | +{% data reusables.code-scanning.enterprise-enable-code-scanning %} |
| 16 | + |
| 17 | +When {% data variables.product.prodname_code_scanning %} identifies a vulnerability, you can link it to a new or existing {% data variables.product.github %} issue. This makes security fixes visible in your planning and project boards alongside your team's regular development work. For more information about how alert tracking works, see [AUTOTITLE](/code-security/concepts/code-scanning/code-scanning-alert-tracking-using-issues). |
| 18 | + |
| 19 | +## Creating an issue from an alert |
| 20 | + |
| 21 | +Create a new issue directly from a {% data variables.product.prodname_code_scanning %} alert, pre-populated with vulnerability details. |
| 22 | + |
| 23 | +{% data reusables.repositories.navigate-to-repo %} |
| 24 | +{% data reusables.repositories.sidebar-security %} |
| 25 | +{% data reusables.repositories.sidebar-code-scanning-alerts %} |
| 26 | +{% data reusables.code-scanning.explore-alert %} |
| 27 | +1. On the right of the alert page, click **Tracking**. |
| 28 | +1. From the dropdown list, select **Create issue**. |
| 29 | + * Select the repository to create the issue in. |
| 30 | + * If applicable, select the template to use for your new issue. |
| 31 | +1. Fill in the issue, providing as much detail as possible. |
| 32 | +1. Optionally, assign the issue to a team member, add labels, or add it to a project. |
| 33 | +1. Click **Create**. |
| 34 | + |
| 35 | +The newly created issue automatically links to the alert. View it by clicking the issue icon below the alert name. |
| 36 | + |
| 37 | +## Linking an alert to an existing issue |
| 38 | + |
| 39 | +Connect an existing issue to a {% data variables.product.prodname_code_scanning %} alert. |
| 40 | + |
| 41 | +{% data reusables.repositories.navigate-to-repo %} |
| 42 | +{% data reusables.repositories.sidebar-security %} |
| 43 | +{% data reusables.repositories.sidebar-code-scanning-alerts %} |
| 44 | +{% data reusables.code-scanning.explore-alert %} |
| 45 | +1. On the right of the alert page, click **Tracking**. |
| 46 | +1. From the dropdown list, select **Add existing {% data variables.product.github %} issue**. |
| 47 | +1. Search by issue number or title, or select a different repository by clicking the Back icon. |
| 48 | +1. Click the issue you want to link. |
| 49 | + |
| 50 | +You can link to issues in different repositories, as long as you have access and {% data variables.product.prodname_github_issues %} is enabled. |
| 51 | + |
| 52 | +## Viewing linked issues |
| 53 | + |
| 54 | +Once you link an issue to an alert, you can view the linked issue in two places: |
| 55 | + |
| 56 | +* **On the alert detail page**: Click the issue icon below the alert name to navigate to the full issue details. |
| 57 | +* **In the list of {% data variables.product.prodname_code_scanning %} alerts**: Linked issues appear alongside their corresponding alerts in the main alerts list view. |
| 58 | + |
| 59 | +## Changing or unlinking a linked issue |
| 60 | + |
| 61 | +{% data reusables.repositories.navigate-to-repo %} |
| 62 | +{% data reusables.repositories.sidebar-security %} |
| 63 | +{% data reusables.repositories.sidebar-code-scanning-alerts %} |
| 64 | +{% data reusables.code-scanning.explore-alert %} |
| 65 | +1. On the right of the alert page, click **Tracking**. |
| 66 | +1. Click **Change or remove issue**. |
| 67 | + |
| 68 | +When you unlink an issue from an alert, the link is removed from the alert page and alert list. The issue itself remains unchanged. |
0 commit comments