scorecards.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Scorecards supply-chain security
  2. on:
  3. # Only the default branch is supported.
  4. branch_protection_rule:
  5. schedule:
  6. - cron: '44 17 * * 0'
  7. push:
  8. branches: [ "main" ]
  9. # Declare default permissions as read only.
  10. permissions: read-all
  11. jobs:
  12. analysis:
  13. name: Scorecards analysis
  14. runs-on: ubuntu-latest
  15. permissions:
  16. # Needed to upload the results to code-scanning dashboard.
  17. security-events: write
  18. # Used to receive a badge.
  19. id-token: write
  20. steps:
  21. - name: "Checkout code"
  22. uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  23. with:
  24. persist-credentials: false
  25. # This is a pre-submit / pre-release.
  26. - name: "Run analysis"
  27. uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
  28. with:
  29. results_file: results.sarif
  30. results_format: sarif
  31. # Publish the results for public repositories to enable scorecard badges. For more details, see
  32. # https://github.com/ossf/scorecard-action#publishing-results.
  33. # For private repositories, `publish_results` will automatically be set to `false`, regardless
  34. # of the value entered here.
  35. publish_results: true
  36. # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
  37. # format to the repository Actions tab.
  38. - name: "Upload artifact"
  39. uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
  40. with:
  41. name: SARIF file
  42. path: results.sarif
  43. retention-days: 5
  44. # Upload the results to GitHub's code scanning dashboard.
  45. - name: "Upload to code-scanning"
  46. uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
  47. with:
  48. sarif_file: results.sarif