Filter creds before writing to logs. 87/5487/1
authorAnil Belur <abelur@linuxfoundation.org>
Sun, 9 Jul 2017 23:55:19 +0000 (09:55 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Sun, 9 Jul 2017 23:55:19 +0000 (09:55 +1000)
Remove any credentials possibily set as evnironment variables
when running the job.

Change-Id: I8e6daa19bb76152944e54be454fc83adbb9221fc
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
shell/deploy

index e330a95..6fd66b1 100755 (executable)
@@ -207,7 +207,7 @@ deploy_logs() {
     {
         echo "build-url: ${build_url}"
     } 2>&1 | tee -a "_build-details.log"
-    env | grep -v PASSWORD | sort > "_build-enviroment-variables.log"
+    env | grep -v -E "SSH|HUDSON|COOKIE|TOKEN|DOCKER|PASSWORD" | sort > "_build-enviroment-variables.log"
 
     # Print system info before collecting logs
     touch "_sys-info.log"