2022-11-15 00:22:10 +00:00
|
|
|
name: Scorecards supply-chain security
|
|
|
|
on:
|
|
|
|
# Only the default branch is supported.
|
|
|
|
branch_protection_rule:
|
|
|
|
schedule:
|
|
|
|
- cron: '44 17 * * 0'
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analysis:
|
|
|
|
name: Scorecards analysis
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
# Needed to upload the results to code-scanning dashboard.
|
|
|
|
security-events: write
|
|
|
|
# Used to receive a badge.
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout code"
|
2024-06-18 10:14:15 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2022-11-15 00:22:10 +00:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
2024-02-14 10:13:03 +00:00
|
|
|
# This is a pre-submit / pre-release.
|
2022-11-15 00:22:10 +00:00
|
|
|
- name: "Run analysis"
|
2024-08-01 10:47:56 +00:00
|
|
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
2022-11-15 00:22:10 +00:00
|
|
|
with:
|
|
|
|
results_file: results.sarif
|
|
|
|
results_format: sarif
|
|
|
|
|
|
|
|
# Publish the results for public repositories to enable scorecard badges. For more details, see
|
|
|
|
# https://github.com/ossf/scorecard-action#publishing-results.
|
|
|
|
# For private repositories, `publish_results` will automatically be set to `false`, regardless
|
|
|
|
# of the value entered here.
|
|
|
|
publish_results: true
|
|
|
|
|
|
|
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
|
|
# format to the repository Actions tab.
|
|
|
|
- name: "Upload artifact"
|
2024-07-09 09:25:07 +00:00
|
|
|
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
|
2022-11-15 00:22:10 +00:00
|
|
|
with:
|
|
|
|
name: SARIF file
|
|
|
|
path: results.sarif
|
|
|
|
retention-days: 5
|
|
|
|
|
|
|
|
# Upload the results to GitHub's code scanning dashboard.
|
|
|
|
- name: "Upload to code-scanning"
|
2024-07-31 08:00:39 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
|
2022-11-15 00:22:10 +00:00
|
|
|
with:
|
|
|
|
sarif_file: results.sarif
|