diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 345094e0..a78fbf42 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -22,7 +22,36 @@ jobs: - name: Checkout repository uses: actions/checkout@v7 - - name: Initialize CodeQL + # The CodeQL bundle download (github/codeql-action/init's "Setup CodeQL + # tools" step) streams a ~1GB tarball from GitHub's release CDN and + # does not retry on a transient connection reset (ECONNRESET) itself + # (github/codeql-action, unresolved as of v4 / CLI 2.26.1: the HTTP + # error is retryable but isn't retried internally). Since a `uses:` + # step can't be wrapped by a shell-level retry action, attempt init + # up to 3 times; each retry is a fresh download attempt with no + # meaningful state carried over from a failed attempt. + - name: Initialize CodeQL (attempt 1) + id: codeql-init-1 + uses: github/codeql-action/init@v4 + continue-on-error: true + with: + languages: python + queries: security-and-quality + config-file: .github/codeql/codeql-config.yml + + - name: Initialize CodeQL (attempt 2) + id: codeql-init-2 + if: steps.codeql-init-1.outcome == 'failure' + uses: github/codeql-action/init@v4 + continue-on-error: true + with: + languages: python + queries: security-and-quality + config-file: .github/codeql/codeql-config.yml + + - name: Initialize CodeQL (attempt 3) + id: codeql-init-3 + if: steps.codeql-init-2.outcome == 'failure' uses: github/codeql-action/init@v4 with: languages: python