scorecard.yaml 1.7 KB

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