Merge pull request #92 from sandialabs/pre-commit-ci-update-config #74
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: Scorecard supply-chain security | |
on: | |
branch_protection_rule: | |
schedule: | |
- cron: "22 6 * * 2" | |
push: | |
branches: [ "master" ] | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
analysis: | |
name: Scorecard analysis | |
runs-on: ubuntu-latest | |
permissions: | |
# Needed to upload the results to the code-scanning dashboard. | |
security-events: write | |
# Needed to publish the results and get a badge (see | |
# `publish_results` below). | |
id-token: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- name: "Checkout code" | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
persist-credentials: false | |
- name: "Run analysis" | |
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 | |
with: | |
results_file: results.sarif | |
results_format: 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?tab=readme-ov-file#authentication-with-fine-grained-pat-optional. | |
# repo_token: ${{ secrets.SCORECARD_TOKEN }} | |
publish_results: true | |
- name: "Upload artifact" | |
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
- name: "Upload to code-scanning dashboard" | |
uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6 | |
with: | |
sarif_file: results.sarif |