From abc6fe6dbb724c835f77645a6119dfd5cb2698b0 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Mon, 12 Mar 2018 14:13:54 +0200 Subject: [PATCH] build-ui.sh: use kube::util::ensure-temp-dir instead of static path. Using static paths for temporary files has been a security problem in the past. Use kube::util::ensure-temp-dir to create a safe temporary directory and place the temporary file there. --- hack/build-ui.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/build-ui.sh b/hack/build-ui.sh index 6e2e0e5d539..28d1738f2c9 100755 --- a/hack/build-ui.sh +++ b/hack/build-ui.sh @@ -30,7 +30,8 @@ if ! which go-bindata > /dev/null 2>&1 ; then exit 1 fi -readonly TMP_DATAFILE="/tmp/datafile.go" +kube::util::ensure-temp-dir +readonly TMP_DATAFILE="${KUBE_TEMP}/datafile.go" readonly SWAGGER_SRC="third_party/swagger-ui/..." readonly SWAGGER_PKG="swagger"