OpenSSF Scorecard Review #100
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
# This workflow uses actions that are not certified by GitHub. They are provided | |
# by a third party and are governed by separate terms of service, privacy | |
# policy and support documentation. | |
name: OpenSSF Scorecard Review | |
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 that the Maintained check is occasionally updated. See | |
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained | |
schedule: | |
- cron: '20 7 * * 2' | |
push: | |
branches: | |
- main | |
# 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 code-scanning dashboard. | |
security-events: write | |
# Needed to publish results and get a badge (see publish_results below). | |
id-token: write | |
contents: read | |
actions: read | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- name: Git Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
with: | |
persist-credentials: false | |
- name: Run Scorecard Analysis | |
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
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 Artifacts | |
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
# Upload the results to GitHub's code scanning dashboard. | |
- name: Upload Scan Results | |
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12 | |
with: | |
sarif_file: results.sarif |