scorecard.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: Scorecard supply-chain security
  2. on:
  3. branch_protection_rule:
  4. schedule:
  5. - cron: '27 2 * * 3'
  6. push:
  7. branches: [ "main" ]
  8. permissions: read-all
  9. jobs:
  10. analysis:
  11. name: Scorecard analysis
  12. runs-on: ubuntu-latest
  13. permissions:
  14. # Needed to upload the results to code-scanning dashboard.
  15. security-events: write
  16. # Needed to publish results and get a badge (see publish_results below).
  17. id-token: write
  18. steps:
  19. - uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
  20. with:
  21. egress-policy: audit
  22. - name: "Checkout code"
  23. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  24. with:
  25. persist-credentials: false
  26. - name: "Run analysis"
  27. uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
  28. with:
  29. results_file: results.sarif
  30. results_format: sarif
  31. publish_results: true
  32. # Upload the results to GitHub's code scanning dashboard.
  33. - name: "Upload to code-scanning"
  34. uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
  35. with:
  36. sarif_file: results.sarif