Skip to content
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

Open
jonapich opened this issue Mar 11, 2025 · 2 comments
Open

Annotation to turn off false positive SecretsUsedInArgOrEnv #3059

jonapich opened this issue Mar 11, 2025 · 2 comments
Labels
area/checks kind/enhancement New feature or request

Comments

@jonapich
Copy link
Contributor

Description

I am getting a SecretsUsedInArgOrEnv warning on non-sensitive data.

The variables are named instance_types_file_key and static_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]

@crazy-max
Copy link
Member

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]

@colinhemmings Recall we discussed about it internally with smth like a nolint directive similar to https://golangci-lint.run/usage/false-positives/#nolint-directive

@tonistiigi
Copy link
Member

You can set #check=skip=SecretsUsedInArgOrEnv on top of Dockerfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/checks kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants