From 45bf9e290c2c6837c8ce9c8a689adc9281f9898e Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 21 Oct 2026 23:47:52 -0400 Subject: [PATCH] chore: Pass yarn audit when the audit service is unreachable (#14219) --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83c88c620c..10929a4a9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,7 +96,16 @@ jobs: steps: - uses: actions/checkout@v5 - uses: ./.github/actions/install - - run: yarn npm audit --severity high --recursive --environment production + # Pass when the audit service is unreachable, but still fail on vulnerabilities. + - run: | + set +e + yarn npm audit --severity high --recursive --environment production 2>&1 | tee audit.log + status=${PIPESTATUS[0]} + if [ "$status" -ne 0 ] && grep -qE "RequestError|ETIMEDOUT|ECONNRESET|ECONNREFUSED|EAI_AGAIN|Response Code: 5[0-9]{2}" audit.log; then + echo "::warning::yarn npm audit could not reach the audit service, skipping." + exit 0 + fi + exit "$status" test: needs: changes