-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(misconf): add ability to disable checks by ID #7536
Conversation
@simar7 Should we consider the namespace when ignoring if the user will have their own custom check with the same ID as our disabled check? |
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
701d6d1
to
10bfc7d
Compare
I see your point but I don't think that's needed knowing they shouldn't be using an ID that a builtin check uses. Speaking of that:
|
Correct, id uniqueness is not checked. |
I added the check for namespace 74c9297 |
pkg/iac/rego/scanner_test.go
Outdated
rego.WithDisabledCheckIDs(tt.disabledChecks...), | ||
} | ||
|
||
if tt.inputCheck != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition will always be true. You can default to passing the option with a user-defined namespace, it will have no effect if there is no user check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah doh! thanks for the catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 7246de4
Description
This PR adds the ability to disable Rego checks by their IDs as discussed here. This is not available to users, only within Trivy.
Related PRs
Checklist