Skip to content

[K9VULN-15241] Update docs on suppressed violations#36973

Open
gillarramendi wants to merge 1 commit into
masterfrom
gotzon.illarramendi/suppressed-violations
Open

[K9VULN-15241] Update docs on suppressed violations#36973
gillarramendi wants to merge 1 commit into
masterfrom
gotzon.illarramendi/suppressed-violations

Conversation

@gillarramendi
Copy link
Copy Markdown
Contributor

@gillarramendi gillarramendi commented May 25, 2026

What does this PR do? What is the motivation?

  • Update suppressed violations documentation
  • Violations commented with no-dd-sa are shown on the product as suppressed violations. Update documentation with the current behavior.
  • JIRA

Merge instructions

Merge readiness:

  • Ready for merge

@github-actions
Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files

@gillarramendi gillarramendi marked this pull request as ready for review May 25, 2026 10:52
@gillarramendi gillarramendi requested a review from a team as a code owner May 25, 2026 10:52
Copy link
Copy Markdown
Contributor

@janine-c janine-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants