scorecard.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. workflow_dispatch:
  14. permissions: read-all
  15. jobs:
  16. analysis:
  17. name: Scorecard analysis
  18. runs-on: ubuntu-latest
  19. permissions:
  20. security-events: write
  21. id-token: write
  22. steps:
  23. - name: "Checkout code"
  24. uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
  25. with:
  26. persist-credentials: false
  27. - name: "Run analysis"
  28. uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
  29. with:
  30. results_file: results.sarif
  31. results_format: sarif
  32. # - Publish results to OpenSSF REST API for easy access by consumers
  33. # - Allows the repository to include the Scorecard badge.
  34. # - See https://github.com/ossf/scorecard-action#publishing-results.
  35. publish_results: true
  36. - name: "Upload artifact"
  37. uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
  38. with:
  39. name: SARIF file
  40. path: results.sarif
  41. retention-days: 5
  42. # Upload the results to GitHub's code scanning dashboard.
  43. - name: "Upload to code-scanning"
  44. uses: github/codeql-action/upload-sarif@7e187e1c529d80bac7b87a16e7a792427f65cf02 # v2.22.1
  45. with:
  46. sarif_file: results.sarif