[K9VULN-15241] Update docs on suppressed violations#36973
Open
gillarramendi wants to merge 1 commit into
Open
Conversation
Contributor
Preview links (active after the
|
janine-c
approved these changes
May 25, 2026
Contributor
janine-c
left a comment
There was a problem hiding this comment.
Thanks for this, Gotzon! Looks great; I just made some small edits for readability and to add some links to make it easier for users to take a look in the UI 🙂
| #### Ignore for a specific instance | ||
|
|
||
| To ignore a specific instance of a violation, comment `no-dd-sa` above the line of code to ignore. This prevents that line from ever producing a violation. For example, in the following Python code snippet, the line `foo = 1` would be ignored by Static Code Analysis scans. | ||
| To ignore a specific instance of a violation, comment `no-dd-sa` above the line of code to ignore. Rather than omitting the violation entirely, violations suppressed with `no-dd-sa` are shown as **suppressed** so that you can search and audit them. |
Contributor
There was a problem hiding this comment.
Suggested change
| To ignore a specific instance of a violation, comment `no-dd-sa` above the line of code to ignore. Rather than omitting the violation entirely, violations suppressed with `no-dd-sa` are shown as **suppressed** so that you can search and audit them. | |
| To ignore a specific instance of a violation, comment `no-dd-sa` above the line of code. Violations suppressed with `no-dd-sa` are shown as **suppressed**, rather than omitted entirely, so you can search and audit them. |
| myBar = 2 | ||
| ``` | ||
|
|
||
| [6]: /security/code_security/static_analysis/static_analysis_rules |
Contributor
There was a problem hiding this comment.
Suggested change
| [1]: https://app.datadoghq.com/security/code-security/repositories | |
| [2]: https://app.datadoghq.com/security/code-security/sca | |
| [6]: /security/code_security/static_analysis/static_analysis_rules |
| To ignore a specific instance of a violation, comment `no-dd-sa` above the line of code to ignore. This prevents that line from ever producing a violation. For example, in the following Python code snippet, the line `foo = 1` would be ignored by Static Code Analysis scans. | ||
| To ignore a specific instance of a violation, comment `no-dd-sa` above the line of code to ignore. Rather than omitting the violation entirely, violations suppressed with `no-dd-sa` are shown as **suppressed** so that you can search and audit them. | ||
|
|
||
| In the repository view, suppressed violations appear with `is_suppressed: true`. In the vulnerability explorer, they appear with `status: muted` and `workflow.mute.reason: muted_in_code`. |
Contributor
There was a problem hiding this comment.
Suggested change
| In the repository view, suppressed violations appear with `is_suppressed: true`. In the vulnerability explorer, they appear with `status: muted` and `workflow.mute.reason: muted_in_code`. | |
| On the [Repositories page][1], suppressed violations appear with `is_suppressed: true`. In the [Vulnerabilities explorer][2], they appear with `status: muted` and `workflow.mute.reason: muted_in_code`. |
| ``` | ||
|
|
||
| You can also use `no-dd-sa` to only ignore a particular rule rather than ignoring all rules. To do so, specify the name of the rule you wish to ignore in place of `<rule-name>` using this template: | ||
| You can also use `no-dd-sa` to only suppress a particular rule rather than suppressing all rules. To do so, specify the name of the rule you wish to suppress in place of `<rule-name>` using this template: |
Contributor
There was a problem hiding this comment.
Suggested change
| You can also use `no-dd-sa` to only suppress a particular rule rather than suppressing all rules. To do so, specify the name of the rule you wish to suppress in place of `<rule-name>` using this template: | |
| You can also use `no-dd-sa` to only suppress a particular rule, rather than suppressing all rules. To do so, specify the name of the rule you wish to suppress in place of `<rule-name>` using this template: |
| `no-dd-sa:<rule-name>` | ||
|
|
||
| For example, in the following JavaScript code snippet, the line `my_foo = 1` is analyzed by all rules except for the `javascript-code-style/assignment-name` rule. | ||
| For example, in the following JavaScript code snippet, the line `my_foo = 1` is suppressed only for the `javascript-code-style/assignment-name` rule and is still analyzed by all other rules. |
Contributor
There was a problem hiding this comment.
Suggested change
| For example, in the following JavaScript code snippet, the line `my_foo = 1` is suppressed only for the `javascript-code-style/assignment-name` rule and is still analyzed by all other rules. | |
| For example, in the following JavaScript code snippet, the line `my_foo = 1` is suppressed only for the `javascript-code-style/assignment-name` rule, but all other rules still analyze it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? What is the motivation?
no-dd-saare shown on the product as suppressed violations. Update documentation with the current behavior.Merge instructions
Merge readiness: