Skip to content

Commit abbbb4d

Browse files
mheverychuckjaz
authored andcommitted
ci: do not use shell to expand secure tokens to prevent leaks
1 parent ccd38dd commit abbbb4d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/ci/publish-build-artifacts.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@ function publishRepo {
7575
done
7676

7777
(
78-
# SECURITY CRITICAL: DO NOT remove the set -x on the following line. Removing it will leak the github credentials to the travis log.
79-
set -x
8078
cd $REPO_DIR && \
8179
git config credential.helper "store --file=.git/credentials" && \
82-
echo "https://${GITHUB_TOKEN_ANGULAR}:@github.com" > .git/credentials
80+
# SECURITY CRITICAL: DO NOT use shell to expand vars since it could be logged and leaked.
81+
node -e "console.log('https://'+process.env.GITHUB_TOKEN_ANGULAR+':github.com')" > .git/credentials
8382
)
8483
fi
8584
echo `date` > $REPO_DIR/BUILD_INFO

0 commit comments

Comments
 (0)