From d5fd74cac209b22ac731305948b4f5e52b5b47f0 Mon Sep 17 00:00:00 2001 From: SHL0MS <131039422+SHL0MS@users.noreply.github.com> Date: Mon, 13 Apr 2026 16:58:59 -0400 Subject: [PATCH] fix(ci): don't fail supply chain scan when PR comment can't be posted on fork PRs (#6681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GITHUB_TOKEN for fork PRs is read-only — gh pr comment fails with 'Resource not accessible by integration'. This caused the supply chain scan to show a red X on every fork PR even when no findings were detected. The scan itself still runs and the 'Fail on critical findings' step still exits 1 on real issues. Only the comment posting is gracefully skipped for fork PRs. Closes #6679 Co-authored-by: SHL0MS --- .github/workflows/supply-chain-audit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/supply-chain-audit.yml b/.github/workflows/supply-chain-audit.yml index b94e1dda4..1cee4564d 100644 --- a/.github/workflows/supply-chain-audit.yml +++ b/.github/workflows/supply-chain-audit.yml @@ -183,7 +183,7 @@ jobs: --- *Automated scan triggered by [supply-chain-audit](/.github/workflows/supply-chain-audit.yml). If this is a false positive, a maintainer can approve after manual review.*" - gh pr comment "${{ github.event.pull_request.number }}" --body "$BODY" + gh pr comment "${{ github.event.pull_request.number }}" --body "$BODY" || echo "::warning::Could not post PR comment (expected for fork PRs — GITHUB_TOKEN is read-only)" - name: Fail on critical findings if: steps.scan.outputs.critical == 'true'