From bf3856afe0b5d15d1a46ab74d154cc27dd961acd Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 21 Jun 2025 11:45:45 -0700 Subject: [PATCH] Fix OSSF scorecard branch protection check --- .github/workflows/ossf-scorecard.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index cff5b894f..033e6cc7c 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -23,8 +23,18 @@ jobs: with: persist-credentials: false + - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 + id: create-token + with: + # analyzing classic branch protections requires a token with admin read permissions + # see https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md + # and https://github.com/open-telemetry/community/issues/2769 + app-id: ${{ vars.OSSF_SCORECARD_APP_ID }} + private-key: ${{ secrets.OSSF_SCORECARD_PRIVATE_KEY }} + - uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2 with: + repo_token: ${{ steps.create-token.outputs.token }} results_file: results.sarif results_format: sarif publish_results: true