scorecard.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: Scorecard supply-chain security
  2. on:
  3. # For Branch-Protection check. Only the default branch is supported. See
  4. # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
  5. branch_protection_rule:
  6. # To guarantee Maintained check is occasionally updated. See
  7. # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
  8. schedule:
  9. - cron: '25 21 * * 6'
  10. push:
  11. branches:
  12. - master
  13. - 'release-5[0-9]'
  14. workflow_dispatch:
  15. permissions: read-all
  16. jobs:
  17. analysis:
  18. name: Scorecard analysis
  19. runs-on: ubuntu-latest
  20. permissions:
  21. security-events: write
  22. id-token: write
  23. steps:
  24. - name: "Checkout code"
  25. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  26. with:
  27. persist-credentials: false
  28. - name: "Run analysis"
  29. uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
  30. with:
  31. results_file: results.sarif
  32. results_format: sarif
  33. # - Publish results to OpenSSF REST API for easy access by consumers
  34. # - Allows the repository to include the Scorecard badge.
  35. # - See https://github.com/ossf/scorecard-action#publishing-results.
  36. publish_results: true
  37. - name: "Upload artifact"
  38. uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
  39. with:
  40. name: SARIF file
  41. path: results.sarif
  42. retention-days: 5
  43. # Upload the results to GitHub's code scanning dashboard.
  44. - name: "Upload to code-scanning"
  45. uses: github/codeql-action/upload-sarif@8e0b1c74b1d5a0077b04d064c76ee714d3da7637 # v2.22.1
  46. with:
  47. sarif_file: results.sarif