GH Actions/scorecard: update permissions

... to match the current recommendations.

I've removed the "read" permissions as those should only be needed for "private" repos.

Ref: https://github.com/ossf/scorecard-action#additional-permissions-for-private-repositories
This commit is contained in:
jrfnl 2025-09-20 05:08:06 +02:00
parent 6f0f7a7f68
commit 63540d8cf3
No known key found for this signature in database
GPG Key ID: 88BCD0973A23BCC6
1 changed files with 4 additions and 8 deletions

View File

@ -7,8 +7,7 @@ on:
push:
branches: [ "master" ]
# Declare default permissions as read only.
permissions: read-all
permissions: {}
jobs:
analysis:
@ -17,15 +16,12 @@ jobs:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
# Required when publishing results (badge / API / code scanning)
security-events: write
# Used to receive a badge. (Upcoming feature)
id-token: write
# Needs for private repositories.
contents: read
actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@v4