From 67694ee1db1697d6e21b85dc85f3be6e1dcb95d8 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Tue, 6 Sep 2022 15:54:09 +0200 Subject: [PATCH] Patch release: Don't reveal auth tokens --- CHANGELOG.md | 4 ++++ entrypoint.sh | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71422e3..ea12785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # nf-core/tower-action: Changelog +## [[v3.2.1](https://github.com/nf-core/tower-action/releases/tag/v3.2.1)] - 2022-09-06 + +* Patch release to strip Tower authentication tokens from the log file 😬 + ## [[v3.2.0](https://github.com/nf-core/tower-action/releases/tag/v3.2.0)] - 2022-09-06 * Bumped tower-cli version `0.6.2` -> `0.6.4` diff --git a/entrypoint.sh b/entrypoint.sh index befb82a..67641d4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,10 @@ # Use `tee` to print just stdout to the console but save stdout + stderr to a file LOG_FN="tower_action_"$(date +'%Y_%m_%d-%H_%M')".log" +# Manual curl of service-info +curl https://api.tower.nf/service-info >> $LOG_FN +echo -e "\n\n------\n\n" >> $LOG_FN + # Health check - print basic settings tw -v info \ 2>> $LOG_FN | tee -a $LOG_FN @@ -28,3 +32,6 @@ tw -v \ ${PRE_RUN_SCRIPT:+"--pre-run=pre_run.sh"} \ ${NEXTFLOW_CONFIG:+"--config=nextflow.config"} \ 2>> $LOG_FN | tee -a $LOG_FN + +# Strip secrets from the log file +sed -i "s/$TOWER_ACCESS_TOKEN/xxxxxx/" $LOG_FN