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/en/security/code_security/static_analysis/_index.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ To get started, go to the [**Code Security** setup page][12] or see the [Setup d
38
38
## Integrate into the development lifecycle
39
39
40
40
### Source code management
41
-
{{< whatsnext desc="During code reviews, Datadog can automatically flag Static Code Analysis violations in pull requests by adding inline review comments on the relevant line(s) of code. When applicable, Datadog also provides suggested fixes that can be applied directly in the pull request. You can also open a pull request directly from Datadog to fix a vulnerability or quality issue." >}}
41
+
{{< whatsnext desc="During code reviews, Datadog can automatically flag Static Code Analysis violations in pull requests by adding inline review comments on the relevant line(s) of code. When applicable, Datadog also provides suggested fixes that can be applied directly in the pull request." >}}
@@ -55,7 +55,7 @@ After setting up Static Code Analysis, a scan is run on each commit to a scanned
55
55
* The **Code Vulnerabilities** tab contains the violations found by Datadog's rules in the [Security category][2].
56
56
* The **Code Quality** tab contains the violations found by Datadog's rules in the [Best Practices, Code Style, Error Prone, or Performance categories][3].
57
57
58
-
To filter your results, use the facets to the left of the list, or search. Results can be filtered by service or team facets. For more information about how results are linked to Datadog services and teams, see [Getting Started with Code Security][11].
58
+
To filter your results, use the facets to the left of the list, or search. Results can be [filtered by service or team facets][13].
59
59
60
60
Every row represents a violation. Each violation is associated with the specific commit and branch that is selected in the filters at the top of the page (by default, results are shown for the latest commit on the default branch of the repository you are viewing).
61
61
@@ -122,16 +122,13 @@ paths:
122
122
- path/to/service/code/**
123
123
{{< /code-block >}}
124
124
125
-
126
-
## Remediation
127
-
128
-
### Apply suggested fixes
125
+
## Apply suggested fixes
129
126
<!-- {{< img src="code_security/static_analysis/static-analysis-fixes.png" alt="Fixes tab of a static analysis violation" style="width:80%;">}} -->
130
127
131
128
In Datadog Static Code Analysis, there are two types of suggested fixes:
132
129
133
130
1.**Deterministic Suggested Fix:** For simple violations like linting issues, the rule analyzer automatically provides templated fixes.
134
-
2.**AI-suggested Fix:** For complex violations, fixes are typically not available beforehand. Instead, you can use AI-suggested Fixes, which use OpenAI's GPT-4 to generate a suggested fix. You can choose between "Text" and "Unified Diff" fixes, which outputs plain text instructions or a code change for resolving the violation, respectively.
131
+
2.**AI-suggested Fix:** For complex violations, fixes are typically not available beforehand. Instead, you can use AI-suggested fixes, which use OpenAI's GPT-4 to generate a suggested fix. You can choose between "Text" and "Unified Diff" fixes, which outputs plain text instructions or a code change for resolving the violation, respectively.
135
132
136
133
<!-- {{< img src="code_security/static_analysis/static-analysis-default-fix.png" alt="Visual indicator of a default static analysis suggested fix" style="width:60%;">}}
137
134
@@ -183,3 +180,4 @@ If you believe a specific violation is a false positive, you can flag it as a fa
0 commit comments