From ac562b209ef7b25b3cf5bd21c62a87191c19ef80 Mon Sep 17 00:00:00 2001 From: Sammy Farida Date: Sun, 26 Oct 2025 17:36:09 -0400 Subject: [PATCH] fix: move permissions to job level in scorecard workflow Move permissions from workflow level to job level to comply with OpenSSF Scorecard action restrictions. According to documentation: - No workflow level write permissions allowed - Only the job with ossf/scorecard-action can use id-token: write - This ensures workflow passes validation for publishing results The badge and SARIF upload will now work correctly. --- .github/workflows/scorecard.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 8847a5f..b3ac3c4 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -7,14 +7,13 @@ on: push: branches: [ "main" ] -permissions: - id-token: write # required for publishing - contents: read - security-events: write - jobs: analysis: runs-on: ubuntu-latest + permissions: + id-token: write # required for publishing results and badge + contents: read # required for checking branch protection + security-events: write # required for publishing results steps: - name: Checkout uses: actions/checkout@v4