102 lines
3.7 KiB
YAML
102 lines
3.7 KiB
YAML
name: Scorecard supply-chain security
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
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:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
|
|
poutine_analysis:
|
|
name: Poutine supply chain analysis
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
steps:
|
|
- name: "Checkout code"
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: "Run poutine supply chain check"
|
|
uses: boostsecurityio/poutine-action@84c0a0d32e8d57ae12651222be1eb15351429228 # v0.15.2
|
|
with:
|
|
format: sarif
|
|
output: poutine_results.sarif
|
|
publish_results: true
|
|
|
|
- name: Configure as safe directory (Poutine)
|
|
run: git config --global --add safe.directory /__w/liboqs/liboqs
|
|
|
|
- name: "Upload poutine artifact"
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
with:
|
|
name: Poutine Results SARIF
|
|
path: poutine_results.sarif
|
|
retention-days: 28
|
|
|
|
- name: "Upload poutine to code-scanning"
|
|
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
|
|
with:
|
|
sarif_file: poutine_results.sarif
|
|
|
|
scorecard_analysis:
|
|
name: Scorecard analysis
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# Needed to upload the results to code-scanning dashboard.
|
|
security-events: write
|
|
# Needed to publish results and get a badge (see publish_results below).
|
|
id-token: write
|
|
# Uncomment the permissions below if installing in a private repository.
|
|
# contents: read
|
|
# actions: read
|
|
|
|
steps:
|
|
- name: "Checkout code"
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: "Run ossf scorecard"
|
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
|
with:
|
|
results_format: sarif
|
|
results_file: ossf_results.sarif
|
|
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
|
# - you want to enable the Branch-Protection check on a *public* repository, or
|
|
# - you are installing Scorecard on a *private* repository
|
|
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
|
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
|
|
|
# Public repositories:
|
|
# - Publish results to OpenSSF REST API for easy access by consumers
|
|
# - Allows the repository to include the Scorecard badge.
|
|
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
|
# For private repositories:
|
|
# - `publish_results` will always 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 ossf artifact"
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
with:
|
|
name: OSSF Results SARIF
|
|
path: ossf_results.sarif
|
|
retention-days: 28
|
|
|
|
# Upload the results to GitHub's code scanning dashboard.
|
|
- name: "Upload to ossf to code-scanning"
|
|
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3
|
|
with:
|
|
sarif_file: ossf_results.sarif
|