From 7547c8f6ece923324bb94e001d4e2278338ab80d Mon Sep 17 00:00:00 2001 From: Sophie <29382425+sophietheking@users.noreply.github.com> Date: Tue, 19 Apr 2022 10:09:22 +0200 Subject: [PATCH 1/5] Remove ability to delete code scanning alerts from docs --- ...ub-advanced-security-in-your-enterprise.md | 2 +- ...ode-scanning-alerts-for-your-repository.md | 35 ++++++------------- ...g-code-scanning-alerts-in-pull-requests.md | 2 +- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md index f8547c0cb5..3ad2acbe3d 100644 --- a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md +++ b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md @@ -253,7 +253,7 @@ When code scanning identifies a problem in a pull request, you can review the hi code and resolve the alert. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests)." If you have write permission to a repository you can manage code scanning alerts for that -repository. With write permission to a repository, you can view, fix, dismiss, or delete alerts for potential +repository. With write permission to a repository, you can view, fix, or dismiss alerts for potential vulnerabilities or errors in your repository's code. For more information, see "[Managing code scanning alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository)." #### Generate reports of {% data variables.product.prodname_code_scanning %} alerts diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md index cabaa87dbe..4ef2a68abc 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md @@ -1,7 +1,7 @@ --- title: Managing code scanning alerts for your repository shortTitle: Manage alerts -intro: 'From the security view, you can view, fix, dismiss, or delete alerts for potential vulnerabilities or errors in your project''s code.' +intro: 'From the security view, you can view, fix, or dismiss alerts for potential vulnerabilities or errors in your project''s code.' product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permission to a repository you can manage {% data variables.product.prodname_code_scanning %} alerts for that repository.' versions: @@ -175,11 +175,9 @@ Alerts may be fixed in one branch but not in another. You can use the "Branch" f {% endnote %} {% endif %} -## Dismissing or deleting alerts +## Dismissing alerts -There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. Alternatively, if you have admin permissions for the repository, you can delete alerts. Deleting alerts is useful in situations where you have set up a {% data variables.product.prodname_code_scanning %} tool and then decided to remove it, or where you have configured {% data variables.product.prodname_codeql %} analysis with a larger set of queries than you want to continue using, and you've then removed some queries from the tool. In both cases, deleting alerts allows you to clean up your {% data variables.product.prodname_code_scanning %} results. You can delete alerts from the summary list within the **Security** tab. - -Dismissing an alert is a way of closing an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %} You can dismiss alerts from {% data variables.product.prodname_code_scanning %} annotations in code, or from the summary list within the **Security** tab. +There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. Dismissing an alert is a way of closing an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %} You can dismiss alerts from {% data variables.product.prodname_code_scanning %} annotations in code, or from the summary list within the **Security** tab. When you dismiss an alert: @@ -189,30 +187,11 @@ When you dismiss an alert: - The reason why you closed the alert is recorded. - Next time {% data variables.product.prodname_code_scanning %} runs, the same code won't generate an alert. -When you delete an alert: - -- It's deleted in all branches. -- The alert is removed from the number of current alerts for your project. -- It is _not_ added to the "Closed" list in the summary of alerts. -- If the code that generated the alert stays the same, and the same {% data variables.product.prodname_code_scanning %} tool runs again without any configuration changes, the alert will be shown again in your analysis results. - -To dismiss or delete alerts: +To dismiss alerts: {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} -1. If you have admin permissions for the repository, and you want to delete alerts for this {% data variables.product.prodname_code_scanning %} tool, select some or all of the check boxes and click **Delete**. - - ![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png) - - Optionally, you can use{% ifversion fpt or ghes > 3.1 or ghae or ghec %} the free text search or{% endif %} the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts. - -{% ifversion fpt or ghes > 3.1 or ghae or ghec %} - ![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png) -{% else %} - ![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png) -{% endif %} - 1. If you want to dismiss an alert, it's important to explore the alert first, so that you can choose the correct dismissal reason. Click the alert you'd like to explore. {% ifversion fpt or ghes > 3.1 or ghae or ghec %} @@ -231,6 +210,12 @@ To dismiss or delete alerts: If a project has multiple alerts that you want to dismiss for the same reason, you can bulk dismiss them from the summary of alerts. Typically, you'll want to filter the list and then dismiss all of the matching alerts. For example, you might want to dismiss all of the current alerts in the project that have been tagged for a particular Common Weakness Enumeration (CWE) vulnerability. +{% ifversion fpt or ghes > 3.1 or ghae or ghec %} + ![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png) +{% else %} + ![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png) +{% endif %} + ## Further reading - "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)" diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md index 29eaaa3ea7..bfcf54bc21 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md @@ -99,4 +99,4 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler {% data reusables.code-scanning.false-positive-fix-codeql %} -For more information about dismissing alerts, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#dismissing-or-deleting-alerts)." +For more information about dismissing alerts, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#dismissing-alerts)." From 76969dfa563c778b637337da3cdad9c1b9ad8af4 Mon Sep 17 00:00:00 2001 From: Sophie <29382425+sophietheking@users.noreply.github.com> Date: Tue, 19 Apr 2022 14:12:34 +0200 Subject: [PATCH 2/5] Add versioning for GHES < 3.6 and GHAE --- ...ub-advanced-security-in-your-enterprise.md | 3 +- ...ode-scanning-alerts-for-your-repository.md | 36 +++++++++++++------ ...g-code-scanning-alerts-in-pull-requests.md | 2 +- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md index 3ad2acbe3d..65a0c46bae 100644 --- a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md +++ b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md @@ -253,8 +253,7 @@ When code scanning identifies a problem in a pull request, you can review the hi code and resolve the alert. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests)." If you have write permission to a repository you can manage code scanning alerts for that -repository. With write permission to a repository, you can view, fix, or dismiss alerts for potential -vulnerabilities or errors in your repository's code. For more information, see "[Managing code scanning alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository)." +repository. With write permission to a repository, {% ifversion ghes < 3.6 or ghae %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your repository's code. For more information, see "[Managing code scanning alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository)." #### Generate reports of {% data variables.product.prodname_code_scanning %} alerts diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md index 4ef2a68abc..89e60ffa70 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md @@ -1,7 +1,7 @@ --- title: Managing code scanning alerts for your repository shortTitle: Manage alerts -intro: 'From the security view, you can view, fix, or dismiss alerts for potential vulnerabilities or errors in your project''s code.' +intro: 'From the security view, {% ifversion ghes < 3.6 or ghae %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your project''s code.' product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permission to a repository you can manage {% data variables.product.prodname_code_scanning %} alerts for that repository.' versions: @@ -175,9 +175,11 @@ Alerts may be fixed in one branch but not in another. You can use the "Branch" f {% endnote %} {% endif %} -## Dismissing alerts +## Dismissing {% ifversion ghes < 3.6 or ghae %}or deleting{% endif %} alerts -There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. Dismissing an alert is a way of closing an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %} You can dismiss alerts from {% data variables.product.prodname_code_scanning %} annotations in code, or from the summary list within the **Security** tab. +There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. {% ifversion ghes < 3.6 or ghae %}Alternatively, if you have admin permissions for the repository, you can delete alerts. Deleting alerts is useful in situations where you have set up a {% data variables.product.prodname_code_scanning %} tool and then decided to remove it, or where you have configured {% data variables.product.prodname_codeql %} analysis with a larger set of queries than you want to continue using, and you've then removed some queries from the tool. In both cases, deleting alerts allows you to clean up your {% data variables.product.prodname_code_scanning %} results. You can delete alerts from the summary list within the **Security** tab.{% endif %} + +Dismissing an alert is a way of closing an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %} You can dismiss alerts from {% data variables.product.prodname_code_scanning %} annotations in code, or from the summary list within the **Security** tab. When you dismiss an alert: @@ -187,11 +189,29 @@ When you dismiss an alert: - The reason why you closed the alert is recorded. - Next time {% data variables.product.prodname_code_scanning %} runs, the same code won't generate an alert. -To dismiss alerts: +{% ifversion ghes < 3.6 or ghae %}When you delete an alert: + +- It's deleted in all branches. +- The alert is removed from the number of current alerts for your project. +- It is _not_ added to the "Closed" list in the summary of alerts. +- If the code that generated the alert stays the same, and the same {% data variables.product.prodname_code_scanning %} tool runs again without any configuration changes, the alert will be shown again in your analysis results.{% endif %} + +To dismiss {% ifversion ghes < 3.6 or ghae %}or delete{% endif %} alerts: {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} -{% data reusables.repositories.sidebar-code-scanning-alerts %} +{% data reusables.repositories.sidebar-code-scanning-alerts %}{% ifversion ghes < 3.6 or ghae %} +1. If you have admin permissions for the repository, and you want to delete alerts for this {% data variables.product.prodname_code_scanning %} tool, select some or all of the check boxes and click **Delete**. + + ![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png) + + Optionally, you can use{% ifversion fpt or ghes > 3.1 or ghae or ghec %} the free text search or{% endif %} the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts. + +{% ifversion ghes > 3.1 or ghae %} + ![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png) +{% else %} + ![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png) +{% endif %}{% endif %} 1. If you want to dismiss an alert, it's important to explore the alert first, so that you can choose the correct dismissal reason. Click the alert you'd like to explore. {% ifversion fpt or ghes > 3.1 or ghae or ghec %} @@ -210,12 +230,6 @@ To dismiss alerts: If a project has multiple alerts that you want to dismiss for the same reason, you can bulk dismiss them from the summary of alerts. Typically, you'll want to filter the list and then dismiss all of the matching alerts. For example, you might want to dismiss all of the current alerts in the project that have been tagged for a particular Common Weakness Enumeration (CWE) vulnerability. -{% ifversion fpt or ghes > 3.1 or ghae or ghec %} - ![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png) -{% else %} - ![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png) -{% endif %} - ## Further reading - "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)" diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md index bfcf54bc21..dcc5d288a8 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md @@ -99,4 +99,4 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler {% data reusables.code-scanning.false-positive-fix-codeql %} -For more information about dismissing alerts, see "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#dismissing-alerts)." +For more information about dismissing alerts, see {% ifversion ghes < 3.6 or ghae %}"[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#dismissing-or-deleting-alerts)."{% else %} "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#dismissing--alerts)."{% endif %} From 563f52e6ed3d0d32bdb33324a25f2c699187b911 Mon Sep 17 00:00:00 2001 From: Sophie <29382425+sophietheking@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:26:28 +0200 Subject: [PATCH 3/5] Added feature flag for GHAE --- ...ng-github-advanced-security-in-your-enterprise.md | 2 +- ...aging-code-scanning-alerts-for-your-repository.md | 12 ++++++------ ...triaging-code-scanning-alerts-in-pull-requests.md | 2 +- data/features/delete-code-scanning-alerts.yml | 6 ++++++ 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 data/features/delete-code-scanning-alerts.yml diff --git a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md index 65a0c46bae..209e4d6b03 100644 --- a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md +++ b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md @@ -253,7 +253,7 @@ When code scanning identifies a problem in a pull request, you can review the hi code and resolve the alert. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests)." If you have write permission to a repository you can manage code scanning alerts for that -repository. With write permission to a repository, {% ifversion ghes < 3.6 or ghae %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your repository's code. For more information, see "[Managing code scanning alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository)." +repository. With write permission to a repository, {% if delete-code-scanning-alerts %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your repository's code. For more information, see "[Managing code scanning alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository)." #### Generate reports of {% data variables.product.prodname_code_scanning %} alerts diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md index 89e60ffa70..686f36890d 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md @@ -1,7 +1,7 @@ --- title: Managing code scanning alerts for your repository shortTitle: Manage alerts -intro: 'From the security view, {% ifversion ghes < 3.6 or ghae %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your project''s code.' +intro: 'From the security view, {% if delete-code-scanning-alerts %}you can view, fix, dismiss, or delete alerts {% else %}you can view, fix, or dismiss alerts{% endif %} for potential vulnerabilities or errors in your project''s code.' product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permission to a repository you can manage {% data variables.product.prodname_code_scanning %} alerts for that repository.' versions: @@ -175,9 +175,9 @@ Alerts may be fixed in one branch but not in another. You can use the "Branch" f {% endnote %} {% endif %} -## Dismissing {% ifversion ghes < 3.6 or ghae %}or deleting{% endif %} alerts +## Dismissing {% if delete-code-scanning-alerts %}or deleting{% endif %} alerts -There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. {% ifversion ghes < 3.6 or ghae %}Alternatively, if you have admin permissions for the repository, you can delete alerts. Deleting alerts is useful in situations where you have set up a {% data variables.product.prodname_code_scanning %} tool and then decided to remove it, or where you have configured {% data variables.product.prodname_codeql %} analysis with a larger set of queries than you want to continue using, and you've then removed some queries from the tool. In both cases, deleting alerts allows you to clean up your {% data variables.product.prodname_code_scanning %} results. You can delete alerts from the summary list within the **Security** tab.{% endif %} +There are two ways of closing an alert. You can fix the problem in the code, or you can dismiss the alert. {% if delete-code-scanning-alerts %}Alternatively, if you have admin permissions for the repository, you can delete alerts. Deleting alerts is useful in situations where you have set up a {% data variables.product.prodname_code_scanning %} tool and then decided to remove it, or where you have configured {% data variables.product.prodname_codeql %} analysis with a larger set of queries than you want to continue using, and you've then removed some queries from the tool. In both cases, deleting alerts allows you to clean up your {% data variables.product.prodname_code_scanning %} results. You can delete alerts from the summary list within the **Security** tab.{% endif %} Dismissing an alert is a way of closing an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %} You can dismiss alerts from {% data variables.product.prodname_code_scanning %} annotations in code, or from the summary list within the **Security** tab. @@ -189,18 +189,18 @@ When you dismiss an alert: - The reason why you closed the alert is recorded. - Next time {% data variables.product.prodname_code_scanning %} runs, the same code won't generate an alert. -{% ifversion ghes < 3.6 or ghae %}When you delete an alert: +{% if delete-code-scanning-alerts %}When you delete an alert: - It's deleted in all branches. - The alert is removed from the number of current alerts for your project. - It is _not_ added to the "Closed" list in the summary of alerts. - If the code that generated the alert stays the same, and the same {% data variables.product.prodname_code_scanning %} tool runs again without any configuration changes, the alert will be shown again in your analysis results.{% endif %} -To dismiss {% ifversion ghes < 3.6 or ghae %}or delete{% endif %} alerts: +To dismiss {% if delete-code-scanning-alerts %}or delete{% endif %} alerts: {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} -{% data reusables.repositories.sidebar-code-scanning-alerts %}{% ifversion ghes < 3.6 or ghae %} +{% data reusables.repositories.sidebar-code-scanning-alerts %}{% if delete-code-scanning-alerts %} 1. If you have admin permissions for the repository, and you want to delete alerts for this {% data variables.product.prodname_code_scanning %} tool, select some or all of the check boxes and click **Delete**. ![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png) diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md index dcc5d288a8..0facaadb22 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md @@ -99,4 +99,4 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler {% data reusables.code-scanning.false-positive-fix-codeql %} -For more information about dismissing alerts, see {% ifversion ghes < 3.6 or ghae %}"[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#dismissing-or-deleting-alerts)."{% else %} "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#dismissing--alerts)."{% endif %} +For more information about dismissing alerts, see {% if delete-code-scanning-alerts %}"[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#dismissing-or-deleting-alerts)."{% else %} "[Managing {% data variables.product.prodname_code_scanning %} alerts for your repository](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#dismissing--alerts)."{% endif %} diff --git a/data/features/delete-code-scanning-alerts.yml b/data/features/delete-code-scanning-alerts.yml new file mode 100644 index 0000000000..4bfc39c755 --- /dev/null +++ b/data/features/delete-code-scanning-alerts.yml @@ -0,0 +1,6 @@ +# Tracking removing ability to delete code scanning alerts: ghae-issue-6776 +# https://github.com/github/docs-content/issues/6776 + +versions: + ghae: '*' + ghes: '<3.6' From 19c15891d1336c3d432fb4c3c3299d02671e91bf Mon Sep 17 00:00:00 2001 From: Sophie <29382425+sophietheking@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:33:06 +0200 Subject: [PATCH 4/5] Remove reference to docs-content --- data/features/delete-code-scanning-alerts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/features/delete-code-scanning-alerts.yml b/data/features/delete-code-scanning-alerts.yml index 4bfc39c755..020a2d8d9f 100644 --- a/data/features/delete-code-scanning-alerts.yml +++ b/data/features/delete-code-scanning-alerts.yml @@ -1,5 +1,5 @@ # Tracking removing ability to delete code scanning alerts: ghae-issue-6776 -# https://github.com/github/docs-content/issues/6776 +# https://github.com/github/releases/issues/2223 versions: ghae: '*' From 3ab91f332fa265034a97128983fed0b0f4ade2ac Mon Sep 17 00:00:00 2001 From: Sophie <29382425+sophietheking@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:37:33 +0200 Subject: [PATCH 5/5] Silly goose --- data/features/delete-code-scanning-alerts.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/data/features/delete-code-scanning-alerts.yml b/data/features/delete-code-scanning-alerts.yml index 020a2d8d9f..8a836fed97 100644 --- a/data/features/delete-code-scanning-alerts.yml +++ b/data/features/delete-code-scanning-alerts.yml @@ -1,5 +1,4 @@ # Tracking removing ability to delete code scanning alerts: ghae-issue-6776 -# https://github.com/github/releases/issues/2223 versions: ghae: '*'