You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ By default, {% data variables.product.prodname_code_scanning %} analyzes your co
27
27
28
28
Each alert highlights a problem with the code and the name of the tool that identified it. You can see the line of code that triggered the alert, as well as properties of the alert, such as the alert severity{% ifversion fpt or ghes > 3.1 or ghae or ghec %}, security severity,{% endif %} and the nature of the problem. Alerts also tell you when the issue was first introduced. For alerts identified by {% data variables.product.prodname_codeql %} analysis, you will also see information on how to fix the problem.
29
29
30
+
{% data reusables.code-scanning.alert-default-branch %}
31
+
30
32

31
33
32
34
If you set up {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_codeql %}, you can also find data-flow problems in your code. Data-flow analysis finds potential security issues in code, such as: using data insecurely, passing dangerous arguments to functions, and leaking sensitive information.
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,13 @@ By default, the code scanning alerts page is filtered to show alerts for the def
46
46
{% else %}
47
47

48
48
{% endif %}
49
+
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %}
50
+
1. {% data reusables.code-scanning.alert-default-branch %}
51
+
<!-- Insert screenshot with status and Affected branches sections highlighted-->
52
+
{% endif %}
49
53
1. Optionally, if the alert highlights a problem with data flow, click **Show paths** to display the path from the data source to the sink where it's used.
50
54

51
-
1. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code.
55
+
2. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code.
52
56

53
57
54
58
For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts)."
@@ -80,6 +84,10 @@ The benefit of using keyword filters is that only values with results are shown
80
84
81
85
If you enter multiple filters, the view will show alerts matching _all_ these filters. For example, `is:closed severity:high branch:main` will only display closed high-severity alerts that are present on the `main` branch. The exception is filters relating to refs (`ref`, `branch` and `pr`): `is:open branch:main branch:next` will show you open alerts from both the `main` branch and the `next` branch.
82
86
87
+
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %}
88
+
{% data reusables.code-scanning.filter-non-default-branches %}
89
+
{% endif %}
90
+
83
91
{% ifversion fpt or ghes > 3.3 or ghec %}
84
92
85
93
You can prefix the `tag` filter with `-` to exclude results with that tag. For example, `-tag:style` only shows alerts that do not have the `style` tag{% if codeql-ml-queries %} and `-tag:experimental` will omit all experimental alerts. For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-experimental-alerts)."{% else %}.{% endif %}
@@ -143,7 +151,11 @@ If you have write permission for a repository, you can view fixed alerts by view
143
151
144
152
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 in turn mark all matching alerts as closed.
145
153
146
-
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.
154
+
Alerts may be fixed in one branch but not in another. You can use the "Branch" filter, on the summary of alerts, to check whether an alert is fixed in a particular branch.
155
+
156
+
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %}
157
+
{% data reusables.code-scanning.filter-non-default-branches %}
158
+
{% endif %}
147
159
148
160
{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
149
161

Copy file name to clipboardExpand all lines: content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,10 @@ If you have write permission for the repository, some annotations contain links
74
74
75
75
To see more information about an alert, users with write permission can click the **Show more details** link shown in the annotation. This allows you to see all of the context and metadata provided by the tool in an alert view. In the example below, you can see tags showing the severity, type, and relevant common weakness enumerations (CWEs) for the problem. The view also shows which commit introduced the problem.
76
76
77
+
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6249 %}
78
+
{% data reusables.code-scanning.alert-default-branch %}
79
+
{% endif %}
80
+
77
81
In the detailed view for an alert, some {% data variables.product.prodname_code_scanning %} tools, like {% data variables.product.prodname_codeql %} analysis, also include a description of the problem and a **Show more** link for guidance on how to fix your code.
78
82
79
83

The status and information on the alert page will only reflect the state of the alert on the default branch, even if an alert exists in other branches of the repository. You can see the status of the alert on non-default branches in the **Affected branches** section in the right-hand sidebar of the alert page. If an alert does not exist in the default branch, the status of the alert will display as "in pull request" or "in branch" and the status label will be colored grey.
Please note that if you have filtered for alerts on a non-default branch, but the same alerts exist on the default branch, the alert page for any given alert will still only reflect the alert's status on the default branch, even if it conflicts with the status on a non-default branch. For example, an alert that appears in the "Open" list in the summary of alerts for `branch-x` could show a status of "Fixed" on the alert page, if the alert was already fixed on the default branch. You can view the status of the alert for the branch you filtered on in the **Affected branches** section in the right-hand sidebar of the alert page.
0 commit comments