Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/dockerfile/dockerfile2llb/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2616,6 +2616,8 @@ func getSecretsRegex() (*regexp.Regexp, *regexp.Regexp) {

allowTokens := []string{
"public",
"file",
"version",
}
allowPattern := `(?i)(?:_|^)(?:` + strings.Join(allowTokens, "|") + `)(?:_|$)`
secretsAllowRegexp = regexp.MustCompile(allowPattern)
Expand Down
3 changes: 3 additions & 0 deletions frontend/dockerfile/dockerfile_lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ ENV apikey=bar sunflower=foo
ENV git_key=
ENV PUBLIC_KEY=
ARG public_token
ARG SECRET_PASSPHRASE_FILE
ENV password_file=bar secret_File=baz
ARG AUTH_MODULE_VERSION
# check=skip=SecretsUsedInArgOrEnv // allow secret in environment
ENV password=bar
# check=skip=SecretsUsedInArgOrEnv // allow secret in arg
Expand Down