Merge pull request #267 from georgettica/dependabot/github_actions/do… #1081
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: Scorecards supply-chain security | |
on: | |
# Only the default branch is supported. | |
branch_protection_rule: | |
schedule: | |
- cron: "0 2 * * *" | |
push: | |
branches: ['main'] | |
# Declare default permissions as read only. | |
permissions: | |
contents: read | |
jobs: | |
analysis: | |
name: Scorecards analysis | |
runs-on: ubuntu-latest | |
permissions: | |
# Needed to upload the results to code-scanning dashboard. | |
security-events: write | |
id-token: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | |
with: | |
egress-policy: audit | |
- name: "Checkout code" | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
persist-credentials: false | |
- name: "Run analysis" | |
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
repo_token: ${{ secrets.SCORECARD_TOKEN || github.token }} | |
# Publish the results to enable scorecard badges. For more details, see | |
# https://github.com/ossf/scorecard-action#publishing-results. | |
publish_results: true | |
# Upload the results as artifacts (optional). | |
- name: "Upload artifact" | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
# Upload the results to GitHub's code scanning dashboard. | |
- name: "Upload to code-scanning" | |
uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13 | |
with: | |
sarif_file: results.sarif |