mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 10:20:32 +00:00
fix: add repo_token and permissions to scorecard workflow
This commit is contained in:
7
.github/workflows/scorecard.yml
vendored
7
.github/workflows/scorecard.yml
vendored
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 6 * * 1' # every Monday at 06:00 UTC
|
- cron: '0 6 * * 1'
|
||||||
|
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
@@ -15,20 +15,21 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
security-events: write
|
security-events: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
# Note: scorecard-action is a Docker-based action that resolves by tag only,
|
|
||||||
# SHA pinning causes resolution failures. Using tag per ossf recommendation.
|
|
||||||
- name: Run OpenSSF Scorecard
|
- name: Run OpenSSF Scorecard
|
||||||
uses: ossf/scorecard-action@v2.4.3
|
uses: ossf/scorecard-action@v2.4.3
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
results_format: sarif
|
results_format: sarif
|
||||||
publish_results: true
|
publish_results: true
|
||||||
|
repo_token: ${{ secrets.SCORECARD_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload Scorecard results to GitHub Security tab
|
- name: Upload Scorecard results to GitHub Security tab
|
||||||
uses: github/codeql-action/upload-sarif@a60c4df7a135c7317c1e9ddf9b5a9b07a910dda9 # v4
|
uses: github/codeql-action/upload-sarif@a60c4df7a135c7317c1e9ddf9b5a9b07a910dda9 # v4
|
||||||
|
|||||||
Reference in New Issue
Block a user