Skip to content

Commit 348282c

Browse files
authored
Simplify conditions in articles following the duplication with the move to code-security (github#18754)
1 parent 6fb490e commit 348282c

File tree

46 files changed

+120
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+120
-422
lines changed

content/code-security/secure-coding/about-code-scanning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ versions:
1212
topics:
1313
- security
1414
---
15+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1516

1617
{% data reusables.code-scanning.beta %}
1718
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
@@ -59,7 +60,6 @@ You can view and contribute to the queries for {% data variables.product.prodnam
5960

6061
### Further reading
6162

62-
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
63-
- "[About securing your repository](/github/administering-a-repository/about-securing-your-repository)"{% endif %}
63+
- "[About securing your repository](/github/administering-a-repository/about-securing-your-repository)"
6464
- [{% data variables.product.prodname_security %}](https://securitylab.github.com/)
6565
- [OASIS Static Analysis Results Interchange Format (SARIF) TC](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=sarif) on the OASIS Committee website

content/code-security/secure-coding/about-integration-with-code-scanning.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ versions:
1212
topics:
1313
- security
1414
---
15+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1516

1617
{% data reusables.code-scanning.beta %}
1718
{% data reusables.code-scanning.enterprise-enable-code-scanning %}

content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ versions:
1313
topics:
1414
- security
1515
---
16-
16+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->

content/code-security/secure-coding/configuring-code-scanning.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ versions:
1313
topics:
1414
- security
1515
---
16+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1617

1718
{% data reusables.code-scanning.beta %}
1819
{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}

content/code-security/secure-coding/configuring-codeql-code-scanning-in-your-ci-system.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ versions:
1414
topics:
1515
- security
1616
---
17+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1718

1819
{% data reusables.code-scanning.beta-codeql-runner %}
1920
{% data reusables.code-scanning.beta %}

content/code-security/secure-coding/configuring-the-codeql-workflow-for-compiled-languages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ versions:
1515
topics:
1616
- security
1717
---
18+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1819

1920
{% data reusables.code-scanning.beta %}
2021
{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}

content/code-security/secure-coding/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ versions:
1313
topics:
1414
- security
1515
---
16+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1617

1718
### Table of Contents
1819

content/code-security/secure-coding/integrating-with-code-scanning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ versions:
1414
topics:
1515
- security
1616
---
17-
17+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->

content/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository.md

Lines changed: 3 additions & 23 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: Managing alerts
4-
intro: 'From the security view, you can view, fix, {% if currentVersion == "enterprise-server@2.22" %}or close{% else %}dismiss, or delete{% endif %} alerts for potential vulnerabilities or errors in your project''s code.'
4+
intro: 'From the security view, you can view, fix, dismiss, or delete alerts 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:
@@ -15,6 +15,7 @@ redirect_from:
1515
topics:
1616
- security
1717
---
18+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1819

1920
{% data reusables.code-scanning.beta %}
2021

@@ -63,7 +64,7 @@ You need write permission to view a summary of all the alerts for a repository o
6364

6465
Anyone with write permission for a repository can fix an alert by committing a correction to the code. If the repository has {% data variables.product.prodname_code_scanning %} scheduled to run on pull requests, it's best to raise a pull request with your correction. This will trigger {% data variables.product.prodname_code_scanning %} analysis of the changes and test that your fix doesn't introduce any new problems. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)" and "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
6566

66-
If you have write permission for a repository, you can view fixed alerts by viewing the summary of alerts and clicking **Closed**. For more information, see "[Viewing the alerts for a repository](#viewing-the-alerts-for-a-repository)." The "Closed" list shows fixed alerts and alerts that users have {% if currentVersion == "enterprise-server@2.22" %}closed{% else %}dismissed{% endif %}.
67+
If you have write permission for a repository, you can view fixed alerts by viewing the summary of alerts and clicking **Closed**. For more information, see "[Viewing the alerts for a repository](#viewing-the-alerts-for-a-repository)." The "Closed" list shows fixed alerts and alerts that users have dismissed.
6768

6869
Alerts may be fixed in one branch but not in another. You can use the "Branch" drop-down menu, on the summary of alerts, to check whether an alert is fixed in a particular branch.
6970

@@ -73,14 +74,6 @@ Alerts may be fixed in one branch but not in another. You can use the "Branch" d
7374
![Filtering alerts by branch](/assets/images/enterprise/3.1/help/repository/code-scanning-branch-filter.png)
7475
{% endif %}
7576

76-
{% if currentVersion == "enterprise-server@2.22" %}
77-
78-
### Closing an alert
79-
80-
Closing an alert is a way to resolve an alert that you don't think needs to be fixed. {% data reusables.code-scanning.close-alert-examples %}
81-
82-
{% else %}
83-
8477
### Dismissing or deleting alerts
8578

8679
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.
@@ -104,20 +97,9 @@ When you delete an alert:
10497

10598
To dismiss or delete alerts:
10699

107-
{% endif %}
108-
109100
{% data reusables.repositories.navigate-to-repo %}
110101
{% data reusables.repositories.sidebar-security %}
111102
{% data reusables.repositories.sidebar-code-scanning-alerts %}
112-
{% if currentVersion == "enterprise-server@2.22" %}
113-
{% data reusables.code-scanning.click-alert-in-list %}
114-
1. Select the **Close** drop-down menu and click a reason for closing the alert.
115-
![Choosing reason for closing the alert via the Close drop-down](/assets/images/help/repository/code-scanning-alert-close-drop-down.png)
116-
117-
{% data reusables.code-scanning.false-positive-fix-codeql %}
118-
119-
{% else %}
120-
121103
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**.
122104

123105
![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png)
@@ -149,8 +131,6 @@ To dismiss or delete alerts:
149131

150132
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.
151133

152-
{% endif %}
153-
154134
### Further reading
155135

156136
- "[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/secure-coding/running-codeql-code-scanning-in-a-container.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ versions:
1212
topics:
1313
- security
1414
---
15+
<!--For this article in earlier GHES versions, see /content/github/finding-security-vulnerabilities-and-errors-in-your-code-->
1516

1617
{% data reusables.code-scanning.beta %}
1718

0 commit comments

Comments
 (0)