2023-08-30 17:47:06 +00:00
|
|
|
name: Scorecard supply-chain security
|
|
|
|
on:
|
|
|
|
# For Branch-Protection check. Only the default branch is supported. See
|
|
|
|
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
|
|
|
branch_protection_rule:
|
|
|
|
# To guarantee Maintained check is occasionally updated. See
|
|
|
|
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
|
|
|
schedule:
|
|
|
|
- cron: '36 17 * * 5'
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analysis:
|
|
|
|
name: Scorecard analysis
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
security-events: write # to upload the results to code-scanning dashboard
|
|
|
|
id-token: write # to publish results and get a badge
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout code"
|
2024-07-16 00:48:59 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-08-30 17:47:06 +00:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
|
|
|
- name: "Run analysis"
|
2024-05-21 14:09:12 +00:00
|
|
|
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
|
2023-08-30 17:47:06 +00:00
|
|
|
with:
|
|
|
|
results_file: results.sarif
|
|
|
|
results_format: sarif
|
|
|
|
# To enable Branch-Protection uncomment the `repo_token` line below
|
|
|
|
# To create the Fine-grained PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional.
|
|
|
|
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
|
|
|
publish_results: true # allows the repo to include the Scorecard badge
|
|
|
|
|
|
|
|
# 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-16 00:48:59 +00:00
|
|
|
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
|
2023-08-30 17:47:06 +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-22 13:34:13 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
|
2023-08-30 17:47:06 +00:00
|
|
|
with:
|
|
|
|
sarif_file: results.sarif
|