Skip to content

Commit

Permalink
security: fix token leakage in workflow logs
Browse files Browse the repository at this point in the history
  • Loading branch information
JingBh committed Jan 13, 2024
1 parent 4ed7ec0 commit 59344b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ jobs:
- id: aliyun-cr-token
name: Obtain Aliyun Container Registry credentials
run: |
aliyun cr --force --version 2016-06-07 GET /tokens > cr_token.json
TOKEN=$(jq -r '.data.authorizationToken' cr_token.json)
echo "::add-mask::$TOKEN"
echo "json<<EOF" >> $GITHUB_OUTPUT
aliyun cr --force --version 2016-06-07 GET /tokens >> $GITHUB_OUTPUT
cat cr_token.json >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
rm -f cr_token.json
- name: Login to Aliyun Container Registry
uses: docker/login-action@v2
Expand Down

0 comments on commit 59344b9

Please sign in to comment.