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/actions/guides/building-and-testing-net.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ versions:
6
6
fpt: '*'
7
7
ghes: '>=2.22'
8
8
ghae: '*'
9
+
shortTitle: Build & test .NET
9
10
---
10
11
11
12
{% data reusables.actions.enterprise-beta %}
@@ -64,7 +65,7 @@ jobs:
64
65
## Specifying a .NET version
65
66
66
67
To use a preinstalled version of the .NET Core SDK on a {% data variables.product.prodname_dotcom %}-hosted runner, use the `setup-dotnet` action. This action finds a specific version of .NET from the tools cache on each runner, and adds the necessary binaries to `PATH`. These changes will persist for the remainder of the job.
67
-
68
+
68
69
The `setup-dotnet` action is the recommended way of using .NET with {% data variables.product.prodname_actions %}, because it ensures consistent behavior across different runners and different versions of .NET. If you are using a self-hosted runner, you must install .NET and add it to `PATH`. For more information, see the [`setup-dotnet`](https://github.com/marketplace/actions/setup-net-core-sdk) action.
69
70
70
71
### Using multiple .NET versions
@@ -105,7 +106,7 @@ You can configure your job to use a specific version of .NET, such as `3.1.3`. A
105
106
uses: actions/setup-dotnet@v1
106
107
with:
107
108
# Semantic version range syntax or exact version of a dotnet version
Copy file name to clipboardExpand all lines: content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -83,15 +83,19 @@ For more information about the `pull_request` event, see "[Workflow syntax for {
83
83
If you scan pull requests, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
84
84
85
85
{% ifversion fpt or ghes > 3.1 or ghae-next %}
86
-
### Defining the alert severities causing pull request check failure
86
+
### Defining the severities causing pull request check failure
87
87
88
-
By default, only alerts with the severity level of `error`will cause a pull request check failure, and a check will still succeed with alerts of lower severities. You can change the levels of alert severitiesthat will cause a pull request check failure in your repository settings.
88
+
By default, only alerts with the severity level of `Error`{% ifversion fpt or ghes > 3.1 or ghae-issue-4697 %} or security severity level of `Critical` or `High`{% endif %} will cause a pull request check failure, and a check will still succeed with alerts of lower severities. You can change the levels of alert severities{% ifversion fpt or ghes > 3.1 or ghae-issue-4697 %} and of security severities{% endif %} that will cause a pull request check failure in your repository settings. For more information about severity levels, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#about-alerts-details)."
89
89
90
90
{% data reusables.repositories.navigate-to-repo %}
91
91
{% data reusables.repositories.sidebar-settings %}
92
92
{% data reusables.repositories.navigate-to-security-and-analysis %}
93
93
1. Under "Code scanning", to the right of "Check Failure", use the drop-down menu to select the level of severity you would like to cause a pull request check failure.
94
+
{% ifversion fpt or ghes > 3.1 or ghae-issue-4697 %}
Copy file name to clipboardExpand all lines: content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md
+16-1
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,29 @@ By default, {% data variables.product.prodname_code_scanning %} analyzes your co
34
34
35
35
## About alerts details
36
36
37
-
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 severity 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.
37
+
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 severity{% ifversion fpt or ghes > 3.1 or ghae-issue-4697 %}, 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.
38
38
39
39

40
40
41
41
If you set up {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_codeql %}, this can also detect 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.
42
42
43
43
When {% data variables.product.prodname_code_scanning %} reports data-flow alerts, {% data variables.product.prodname_dotcom %} shows you how data moves through the code. {% data variables.product.prodname_code_scanning_capc %} allows you to identify the areas of your code that leak sensitive information, and that could be the entry point for attacks by malicious users.
44
44
45
+
### About severity levels
46
+
47
+
Alert severity levels may be `Error`, `Warning`, or `Note`.
48
+
49
+
By default, any code scanning results with a severity of `error` will cause check failure. {% ifversion fpt or ghes > 3.1 or ghae-next %}You can specify the severity level at which pull requests that trigger code scanning alerts should fail. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)."{% endif %}
50
+
51
+
{% ifversion fpt or ghes > 3.1 or ghae-issue-4697 %}
52
+
### About security severity levels
53
+
54
+
{% data variables.product.prodname_code_scanning_capc %} displays security severity levels for alerts that are generated by security queries. Security severity levels can be `Critical`, `High`, `Medium`, or `Low`.
55
+
56
+
To calculate the security severity of an alert, we use Common Vulnerability Scoring System (CVSS) data. CVSS is an open framework for communicating the characteristics and severity of software vulnerabilities, and is commonly used by other security products to score alerts. For more information about how severity levels are calculated, see [the blog post](https://github.blog/changelog/2021-07-19-codeql-code-scanning-new-severity-levels-for-security-alerts/).
57
+
58
+
By default, any code scanning results with a security severity of `Critical` or `High` will cause a check failure. You can specify which security severity level for code scanning results should cause a check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)."{% endif %}
59
+
45
60
## Viewing the alerts for a repository
46
61
47
62
Anyone with read permission for a repository can see {% data variables.product.prodname_code_scanning %} annotations on pull requests. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
Copy file name to clipboardExpand all lines: content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ In repositories where {% data variables.product.prodname_code_scanning %} is con
29
29
30
30
If {% data variables.product.prodname_code_scanning %} has any results with a severity of `error`, the check fails and the error is reported in the check results. If all the results found by {% data variables.product.prodname_code_scanning %} have lower severities, the alerts are treated as warnings or notices and the check succeeds.
31
31
32
-
{% ifversion fpt or ghes > 3.1 or ghae-next %}You can override the default behavior in your repository settings, by specifying the level of severities that will cause a pull request check failure. For more information, see "[Defining the alert severities causing pull request check failure](/code-security/secure-coding/configuring-code-scanning#defining-the-alert-severities-causing-pull-request-check-failure)".
32
+
{% ifversion fpt or ghes > 3.1 or ghae-next %}You can override the default behavior in your repository settings, by specifying the level of severities {% ifversion fpt or ghes > 3.1 or ghae-issue-4697 %}and security severities {% endif %}that will cause a pull request check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)".
33
33
34
34
{% endif %}If your pull request targets a protected branch that uses {% data variables.product.prodname_code_scanning %}, and the repository owner has configured required status checks, then you must either fix or dismiss all error alerts before the pull request can be merged. For more information, see "[About protected branches](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)."
35
35
@@ -43,7 +43,7 @@ If the repository uses the {% data variables.product.prodname_codeql_workflow %}
43
43
44
44
## Triaging an alert on your pull request
45
45
46
-
When you look at the **Files changed** tab for a pull request, you see annotations for any lines of code that triggered the alert.
46
+
When you look at the **Files changed** tab for a pull request, you see annotations for any lines of code that triggered the alert. The severity of the alert is displayed in the annotation.
47
47
48
48

0 commit comments