From cf93865507d19c209abbd6b65236b63e791c17d3 Mon Sep 17 00:00:00 2001 From: Zijun Yang Date: Sat, 28 Dec 2024 21:37:30 -0500 Subject: [PATCH] fix github action leaking verification code --- .github/workflows/deploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9e5a80e..450f90e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,8 +30,16 @@ jobs: - name: Send deployment request to AuthRun id: send_post run: | + # Mask the code in the logs + echo "::add-mask::${{ env.code }}" + + # Disable command echoing to avoid printing the curl command with the code + set +x response=$(curl -X POST "${{ secrets.FLASK_VERIFIER_URL }}/verify" \ -d "code=${{ env.code }}" -s) + # Re-enable command echoing + set -x + echo "Response: $response" echo "$response" > response.json success=$(echo $response | jq -r '.success')