Skip to content

frontend: prevent SecretsUsedInArgOrEnv warning for _FILE/_VERSION ARG/ENV names#6501

Merged
tonistiigi merged 1 commit intomoby:masterfrom
jonasgeiler:feat/SecretsUsedInArgOrEnv-ignore-file-version
Feb 5, 2026
Merged

frontend: prevent SecretsUsedInArgOrEnv warning for _FILE/_VERSION ARG/ENV names#6501
tonistiigi merged 1 commit intomoby:masterfrom
jonasgeiler:feat/SecretsUsedInArgOrEnv-ignore-file-version

Conversation

@jonasgeiler
Copy link
Copy Markdown
Contributor

Closes #5504

Extending on the PR #5410, I added more allowed tokens to the list.
This should prevent the SecretsUsedInArgOrEnv warning when using environment variables like:

  • SESSION_SECRET_FILE - indicating a file path, not an actual secret value (a common pattern in the community)
  • AUTH_MODULE_VERSION - indicating a mere version number, not a secret value

Signed-off-by: Jonas Geiler <git@jonasgeiler.com>
@jonasgeiler
Copy link
Copy Markdown
Contributor Author

@tonistiigi Hope it's okay if I tag you in this since you also reviewed the original PR #5410

tonistiigi
tonistiigi approved these changes Feb 5, 2026
@tonistiigi tonistiigi merged commit bb7bb20 into moby:master Feb 5, 2026
85 checks passed
@jonasgeiler jonasgeiler deleted the feat/SecretsUsedInArgOrEnv-ignore-file-version branch February 7, 2026 15:01
tinovyatkin added a commit to wharflab/tally that referenced this pull request Mar 5, 2026
- Normalise buildkit version in SARIF snapshot so dependency bumps don't
  break tests
- Backport moby/buildkit#6534: skip CopyIgnoredFile when .dockerignore
  contains negated patterns (static analysis is unreliable with exclusions)
- Backport moby/buildkit#6501: allow _FILE and _VERSION suffixes in
  SecretsUsedInArgOrEnv to reduce false positives

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rule prediction case when name ends with "version"

2 participants