-
Notifications
You must be signed in to change notification settings - Fork 515
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
Annotation to turn off false positive SecretsUsedInArgOrEnv #3059
Comments
@colinhemmings Recall we discussed about it internally with smth like a nolint directive similar to https://golangci-lint.run/usage/false-positives/#nolint-directive |
You can set |
Or like shellcheck behavior. A comment on top of a file disable the rule globally, whereas above a line of code it only ignores the LoC. |
Right now it's just noise because we don't enforce clean checks, but eventually, CI should fail when these come up. Being able to ignore a specific check at the line level is important to retain the ability of flagging new contributions (vs ignoring the whole file, which would silence the warning on the new contribution). |
Is there a way to suppress the warning for a specific ENV or ARG variable if it's a false positive? If not, is there any existing solution or a feature planned to address this? |
Description
I am getting a
SecretsUsedInArgOrEnv
warning on non-sensitive data.The variables are named
instance_types_file_key
andstatic_variables_file_key
. Since this is a refactor I can't rename them just like that and will have to live with the warning.It would be great if there was a way to annotate the line to acknowledge the false positive. For instance, some linters let you use
# noqa
at the minimum to disable these warnings, while some others are more specific e.g.# noqa: ignore[index-error]
The text was updated successfully, but these errors were encountered: