2023-01-17 08:01:47 -05:00
|
|
|
name: Scorecard supply-chain security
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
# Only the default branch is supported.
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analysis:
|
|
|
|
name: Scorecard analysis
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
permissions:
|
|
|
|
# Needed to upload the results to code-scanning dashboard.
|
|
|
|
security-events: write
|
|
|
|
# Needed to publish results and get a badge (for publish_results below).
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
2023-01-18 04:15:58 -05:00
|
|
|
- name: Checkout
|
2023-10-11 07:49:50 -04:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
2023-01-17 08:01:47 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
2023-01-18 04:15:58 -05:00
|
|
|
- name: Run analysis
|
2023-10-11 07:49:50 -04:00
|
|
|
uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
|
2023-01-17 08:01:47 -05:00
|
|
|
with:
|
|
|
|
results_file: results.sarif
|
|
|
|
results_format: sarif
|
|
|
|
publish_results: true
|
|
|
|
|
2023-01-18 04:15:58 -05:00
|
|
|
- name: Upload artifact
|
2023-10-11 07:49:50 -04:00
|
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
2023-01-17 08:01:47 -05:00
|
|
|
with:
|
|
|
|
name: SARIF file
|
|
|
|
path: results.sarif
|
|
|
|
retention-days: 5
|
|
|
|
|
2023-01-18 04:15:58 -05:00
|
|
|
- name: Upload to code-scanning
|
2023-10-11 07:49:50 -04:00
|
|
|
uses: github/codeql-action/upload-sarif@fdcae64e1484d349b3366718cdfef3d404390e85 # v2.22.1
|
2023-01-17 08:01:47 -05:00
|
|
|
with:
|
|
|
|
sarif_file: results.sarif
|