Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ jobs:
name: Scorecard Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

Expand All @@ -34,13 +33,42 @@ jobs:
results_format: sarif
publish_results: true

- name: Upload Results
id: upload-results
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: scorecard
path: results.sarif
retention-days: 1

upload:
name: Scorecard Upload
runs-on: ubuntu-latest
needs: analysis
permissions:
contents: read
security-events: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Download Results
id: download-results
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: scorecard

- name: Fix Locations
id: fix-locations
run: |
jq '(.runs[].results[]?.locations[]?.physicalLocation.artifactLocation | select(.uri == "no file associated with this alert") | .uri) = ".github/workflows/scorecard.yml"' results.sarif > scorecard.sarif

- name: Upload
id: upload
uses: github/codeql-action/upload-sarif@v4
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
sarif_file: scorecard.sarif
Loading