Supply Chain Security Scan #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Supply Chain Security Scan | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] # Scorecard support only default branch | |
branch_protection_rule: | |
schedule: | |
- cron: "50 6 * * 6" | |
permissions: read-all | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
id-token: write # Used to receive a badge. (Upcoming feature) | |
contents: read # Needs for private repositories. | |
actions: read # Needs for private repositories. | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
with: | |
persist-credentials: false | |
- name: Scan by Scorecard | |
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
# (Optional) Read-only 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 Scorecards 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_READ_TOKEN }} | |
# 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 | |
- name: Upload Scorecard report to artifact | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: SARIF file | |
path: results.sarif | |
- name: Publish Scorecard report to GitHub Security | |
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a | |
with: | |
sarif_file: results.sarif |