Skip to content

Commit 76969df

Browse files
committed
Add versioning for GHES < 3.6 and GHAE
1 parent 7547c8f commit 76969df

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

content/admin/code-security/managing-github-advanced-security-for-your-enterprise/deploying-github-advanced-security-in-your-enterprise.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ When code scanning identifies a problem in a pull request, you can review the hi
253253
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)."
254254

255255
If you have write permission to a repository you can manage code scanning alerts for that
256-
repository. With write permission to a repository, you can view, fix, or dismiss alerts for potential
257-
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)."
256+
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)."
258257

259258
#### Generate reports of {% data variables.product.prodname_code_scanning %} alerts
260259

content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Managing code scanning alerts for your repository
33
shortTitle: Manage alerts
4-
intro: 'From the security view, you can view, fix, or dismiss alerts for potential vulnerabilities or errors in your project''s code.'
4+
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.'
55
product: '{% data reusables.gated-features.code-scanning %}'
66
permissions: 'If you have write permission to a repository you can manage {% data variables.product.prodname_code_scanning %} alerts for that repository.'
77
versions:
@@ -175,9 +175,11 @@ Alerts may be fixed in one branch but not in another. You can use the "Branch" f
175175

176176
{% endnote %}
177177
{% endif %}
178-
## Dismissing alerts
178+
## Dismissing {% ifversion ghes < 3.6 or ghae %}or deleting{% endif %} alerts
179179

180-
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.
180+
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 %}
181+
182+
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.
181183

182184
When you dismiss an alert:
183185

@@ -187,11 +189,29 @@ When you dismiss an alert:
187189
- The reason why you closed the alert is recorded.
188190
- Next time {% data variables.product.prodname_code_scanning %} runs, the same code won't generate an alert.
189191

190-
To dismiss alerts:
192+
{% ifversion ghes < 3.6 or ghae %}When you delete an alert:
193+
194+
- It's deleted in all branches.
195+
- The alert is removed from the number of current alerts for your project.
196+
- It is _not_ added to the "Closed" list in the summary of alerts.
197+
- 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 %}
198+
199+
To dismiss {% ifversion ghes < 3.6 or ghae %}or delete{% endif %} alerts:
191200

192201
{% data reusables.repositories.navigate-to-repo %}
193202
{% data reusables.repositories.sidebar-security %}
194-
{% data reusables.repositories.sidebar-code-scanning-alerts %}
203+
{% data reusables.repositories.sidebar-code-scanning-alerts %}{% ifversion ghes < 3.6 or ghae %}
204+
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**.
205+
206+
![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png)
207+
208+
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.
209+
210+
{% ifversion ghes > 3.1 or ghae %}
211+
![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png)
212+
{% else %}
213+
![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png)
214+
{% endif %}{% endif %}
195215
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.
196216

197217
{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
@@ -210,12 +230,6 @@ To dismiss alerts:
210230

211231
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.
212232

213-
{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
214-
![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png)
215-
{% else %}
216-
![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png)
217-
{% endif %}
218-
219233
## Further reading
220234

221235
- "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)"

content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler
9999

100100
{% data reusables.code-scanning.false-positive-fix-codeql %}
101101

102-
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)."
102+
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 %}

0 commit comments

Comments
 (0)