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/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning.md
product: '{% data reusables.rai.code-scanning.gated-feature-autofix %}'
7
7
versions:
8
8
feature: code-scanning-autofix
9
-
fpt: '*'
10
9
type: rai
11
10
topics:
12
11
- Advanced Security
13
12
- Code scanning
14
13
- CodeQL
15
14
- AI
16
15
---
17
-
<!--Note on the versioning above ^. This article is visible to free, pro, team users for transparency. They cannot use the feature so `fpt` is not included in the feature definition.-->
18
-
19
-
{% data reusables.rai.code-scanning.autofix-note %}
20
16
21
17
## About {% data variables.product.prodname_copilot_autofix_short %} for {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %}
22
18
23
19
{% data variables.product.prodname_copilot_autofix %} is an expansion of {% data variables.product.prodname_code_scanning %} that provides users with targeted recommendations to help them fix {% data variables.product.prodname_code_scanning %} alerts so they can avoid introducing new security vulnerabilities. The potential fixes are generated automatically by large language models (LLMs) using data from the codebase and from {% data variables.product.prodname_codeql %} analysis.
24
20
25
-
> [!NOTE]
26
-
> While {% data variables.product.prodname_copilot_autofix_short %} is powered by {% data variables.product.prodname_copilot %}, your enterprise does not need a subscription to {% data variables.product.prodname_copilot %} to use {% data variables.product.prodname_copilot_autofix_short %}. As long as your enterprise has {% data variables.product.prodname_GH_advanced_security %}, you will have access to {% data variables.product.prodname_copilot_autofix_short %}.
21
+
{% data reusables.rai.code-scanning.copilot-autofix-note %}
27
22
28
23
{% data variables.product.prodname_copilot_autofix_short %} generates potential fixes that are relevant to the existing source code and translates the description and location of an alert into code changes that may fix the alert. {% data variables.product.prodname_copilot_autofix_short %} uses internal {% data variables.product.prodname_copilot %} APIs interfacing with the large language model GPT-4o from OpenAI, which has sufficient generative capabilities to produce both suggested fixes in code and explanatory text for those fixes.
29
24
30
-
{% ifversion code-scanning-autofix %}While {% data variables.product.prodname_copilot_autofix_short %} is allowed by default in an enterprise and enabled for every repository using {% data variables.product.prodname_codeql %}, you can choose to opt out and disable {% data variables.product.prodname_copilot_autofix_short %}. To learn how to disable {% data variables.product.prodname_copilot_autofix_short %} at the enterprise, organization and repository levels, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/disabling-autofix-for-code-scanning)."{% endif %}
25
+
While {% data variables.product.prodname_copilot_autofix_short %} is allowed by default and enabled for every repository using {% data variables.product.prodname_codeql %}, you can choose to opt out and disable {% data variables.product.prodname_copilot_autofix_short %}. To learn how to disable {% data variables.product.prodname_copilot_autofix_short %} at the enterprise, organization and repository levels, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/disabling-autofix-for-code-scanning)."
31
26
32
27
In an organization's security overview dashboard, you can view the total number of code suggestions generated on open and closed pull requests in the organization for a given time period. For more information, see "[AUTOTITLE](/enterprise-cloud@latest/code-security/security-overview/viewing-security-insights#autofix-suggestions)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
33
28
34
29
## Developer experience
35
30
36
-
{% data variables.product.prodname_GH_advanced_security %} users can already see any security alerts detected by {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_codeql %} to analyze their pull requests. However, developers often have little training in code security so fixing these alerts requires substantial effort. They must first read and understand the alert location and description, and then use that understanding to edit the source code to fix the vulnerability.
31
+
{% data variables.product.prodname_code_scanning_caps %} users can already see any security alerts detected by {% data variables.product.prodname_codeql %} to analyze their pull requests. However, developers often have little training in code security so fixing these alerts requires substantial effort. They must first read and understand the alert location and description, and then use that understanding to edit the source code to fix the vulnerability.
37
32
38
33
{% data variables.product.prodname_copilot_autofix_short %} lowers the barrier of entry to developers by combining information on best practices with details of the codebase and alert to suggest a potential fix to the developer. Instead of starting with a search for information about the vulnerability, the developer starts with a code suggestion that demonstrates a potential solution for their codebase. The developer evaluates the potential fix to determine whether it is the best solution for their codebase and to ensure that it maintains the intended behavior.
39
34
@@ -120,16 +115,7 @@ It is important to remember that the author of a pull request retains responsibi
*[AUTOTITLE](/enterprise-cloud@latest/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests#working-with-autofix-suggestions-for-alerts-on-a-pull-request) in the {% data variables.product.prodname_ghe_cloud %} documentation
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/managing-code-scanning-alerts/disabling-autofix-for-code-scanning.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,13 @@ topics:
14
14
- AI
15
15
---
16
16
17
-
{% data reusables.rai.code-scanning.autofix-note %}
18
-
19
17
## About disabling {% data variables.product.prodname_copilot_autofix_short %} for {% data variables.product.prodname_code_scanning %}
20
18
21
19
{% data variables.product.prodname_copilot_autofix %} is a {% data variables.product.prodname_copilot %}-powered is an expansion of {% data variables.product.prodname_code_scanning %} that provides users with targeted recommendations to help them fix {% data variables.product.prodname_code_scanning %} alerts so they can avoid introducing new security vulnerabilities. To learn more about {% data variables.product.prodname_copilot_autofix_short %} for {% data variables.product.prodname_code_scanning %}, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning)."
22
20
23
-
{% data variables.product.prodname_copilot_autofix_short %} is allowed by default in an enterprise and enabled for every repository that uses {% data variables.product.prodname_codeql %}, regardless of whether it uses default or advanced setup for {% data variables.product.prodname_code_scanning %}. Administrators at the enterprise, organization and repository levels can choose to opt-out and disable {% data variables.product.prodname_copilot_autofix_short %}.
21
+
{% data reusables.rai.code-scanning.copilot-autofix-note %}
22
+
23
+
{% data variables.product.prodname_copilot_autofix_short %} is allowed by default and enabled for every repository that uses {% data variables.product.prodname_codeql %}, regardless of whether it uses default or advanced setup for {% data variables.product.prodname_code_scanning %}. Administrators at the enterprise, organization and repository levels can choose to opt out and disable {% data variables.product.prodname_copilot_autofix_short %}.
24
24
25
25
Note that disabling {% data variables.product.prodname_copilot_autofix_short %} at any level will close all open {% data variables.product.prodname_copilot_autofix_short %} comments. If {% data variables.product.prodname_copilot_autofix_short %} is disabled and then subsequently enabled, {% data variables.product.prodname_copilot_autofix_short %} won't automatically suggest fixes for any pull requests that are already open. The suggestions will only be generated for any pull requests that are opened after {% data variables.product.prodname_copilot_autofix_short %} is enabled, or after re-running {% data variables.product.prodname_codeql %} analysis on existing pull requests.
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/managing-code-scanning-alerts/managing-code-scanning-alerts-for-your-repository.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -136,9 +136,9 @@ Alternatively, to track a {% data variables.product.prodname_code_scanning %} al
136
136
137
137
## Generating suggested fixes for {% data variables.product.prodname_code_scanning %} alerts
138
138
139
-
{% data reusables.rai.code-scanning.autofix-note %}
139
+
{% data variables.product.prodname_copilot_autofix %} can generate fixes for alerts from {% data variables.product.prodname_codeql %} analysis. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning)."
140
140
141
-
{% data variables.product.prodname_copilot_autofix %} can generate fixes for alerts from {% data variables.product.prodname_codeql %} analysis in private repositories. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning)."
141
+
{% data reusables.rai.code-scanning.copilot-autofix-note %}
142
142
143
143
{% data reusables.repositories.navigate-to-repo %}
144
144
{% data reusables.repositories.sidebar-security %}
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -132,10 +132,10 @@ Anyone with push access to a pull request can fix a {% data variables.product.pr
132
132
133
133
## Working with {% data variables.product.prodname_copilot_autofix_short %} suggestions for alerts on a pull request
134
134
135
-
{% data reusables.rai.code-scanning.autofix-note %}
136
-
137
135
{% data variables.product.prodname_copilot_autofix %} is an expansion of {% data variables.product.prodname_code_scanning %} that provides you with targeted recommendations to help you fix {% data variables.product.prodname_code_scanning %} alerts in pull requests. The potential fixes are generated automatically by large language models (LLMs) using data from the codebase, the pull request, and from {% data variables.product.prodname_codeql %} analysis.
138
136
137
+
{% data reusables.rai.code-scanning.copilot-autofix-note %}
138
+
139
139

140
140
141
141
### Generating {% data variables.product.prodname_copilot_autofix_short %} suggestions and publishing to a pull request
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/managing-your-code-scanning-configuration/java-kotlin-built-in-queries.md
-2
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,4 @@ topics:
20
20
21
21
{% data reusables.code-scanning.codeql-query-tables.codeql-version-info %}
22
22
23
-
{% data reusables.rai.code-scanning.autofix-note %}
24
-
25
23
{% data reusables.code-scanning.codeql-query-tables.java %}
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/managing-your-code-scanning-configuration/javascript-typescript-built-in-queries.md
-2
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,4 @@ topics:
20
20
21
21
{% data reusables.code-scanning.codeql-query-tables.codeql-version-info %}
22
22
23
-
{% data reusables.rai.code-scanning.autofix-note %}
24
-
25
23
{% data reusables.code-scanning.codeql-query-tables.javascript %}
Copy file name to clipboardExpand all lines: content/code-security/security-overview/viewing-security-insights.md
-2
Original file line number
Diff line number
Diff line change
@@ -148,8 +148,6 @@ Alerts that are reopened and re-closed during the chosen time period are ignored
148
148
149
149
### {% data variables.product.prodname_copilot_autofix_short %} suggestions
150
150
151
-
{% data reusables.rai.code-scanning.autofix-note %}
152
-
153
151
{% data variables.product.prodname_copilot_autofix %} is an expansion of {% data variables.product.prodname_code_scanning %} that provides you with targeted recommendations to help you fix {% data variables.product.prodname_code_scanning %} alerts. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-autofix-for-codeql-code-scanning)."
154
152
155
153
The "{% data variables.product.prodname_copilot_autofix_short %} suggestions" metric is the total number of {% data variables.product.prodname_copilot_autofix_short %} suggestions generated in open and closed pull requests during the chosen time period.
> You do not need a subscription to {% data variables.product.prodname_copilot %} to use {% data variables.product.prodname_copilot_autofix %}. {% data variables.product.prodname_copilot_autofix_short %} is available to all public repositories on {% data variables.product.prodname_dotcom_the_website %}, as well as private repositories in {% data variables.product.prodname_ghe_cloud %} enterprises that have a license for {% data variables.product.prodname_GH_advanced_security %}.
{% data variables.product.prodname_copilot_autofix %} for {% data variables.product.prodname_code_scanning %} is available only to {% data variables.product.prodname_ghe_cloud %} users who have {% data variables.product.prodname_GH_advanced_security %}. For more information, see "[AUTOTITLE](/get-started/learning-about-github/about-github-advanced-security)."
1
+
{% data variables.product.prodname_copilot_autofix %} for {% data variables.product.prodname_code_scanning %} is available for all public repositories on {% data variables.product.prodname_dotcom_the_website %}. {% data variables.product.prodname_copilot_autofix %} for {% data variables.product.prodname_code_scanning %} is also available for private repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. For more information, see "[AUTOTITLE](/get-started/learning-about-github/about-github-advanced-security)."
0 commit comments