From 3f1878bd418dc78bc322b66cd8f0a386aaeb3c5e Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 14 Sep 2021 21:46:07 +0100 Subject: [PATCH] docker: whitelist entrypoints - e.g. `pr` (fixes #715) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index da89868008..d41416e113 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,5 +105,5 @@ ENV IN_DOCKER=1 # also works for GitLab CI/CD # https://gitlab.com/gitlab-org/gitlab-runner/-/blob/4c42e96/shells/bash.go#L18-37 # https://gitlab.com/gitlab-org/gitlab-runner/-/blob/4c42e96/shells/bash.go#L288 -ENTRYPOINT ["/bin/bash", "-c", "which -- \"$0\" &>/dev/null && exec \"$0\" \"$@\" || exec cml \"$0\" \"$@\""] +ENTRYPOINT ["/bin/bash", "-c", "echo \"$0\" | grep -qE '^(pr|publish|runner|send-(comment|github-check)|tensorboard-dev)$' && exec \"$0\" \"$@\" || exec cml \"$0\" \"$@\""] CMD ["--help"]