scorecards.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Scorecards supply-chain security
  2. on:
  3. # Only the default branch is supported.
  4. branch_protection_rule:
  5. schedule:
  6. - cron: '44 9 * * 4'
  7. push:
  8. branches: [ "main" ]
  9. jobs:
  10. analysis:
  11. name: Scorecards analysis
  12. runs-on: ubuntu-latest
  13. permissions:
  14. # Needed to upload the results to code-scanning dashboard.
  15. security-events: write
  16. # Used to receive a badge.
  17. id-token: write
  18. # read permissions to all the other objects
  19. actions: read
  20. attestations: read
  21. checks: read
  22. contents: read
  23. deployments: read
  24. issues: read
  25. discussions: read
  26. packages: read
  27. pages: read
  28. pull-requests: read
  29. statuses: read
  30. steps:
  31. - name: "Checkout code"
  32. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.4.2
  33. with:
  34. persist-credentials: false
  35. - name: "Run analysis"
  36. uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # tag=v2.4.0
  37. with:
  38. results_file: results.sarif
  39. results_format: sarif
  40. # Publish the results for public repositories to enable scorecard badges. For more details, see
  41. # https://github.com/ossf/scorecard-action#publishing-results.
  42. # For private repositories, `publish_results` will automatically be set to `false`, regardless
  43. # of the value entered here.
  44. publish_results: true
  45. # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
  46. # format to the repository Actions tab.
  47. - name: "Upload artifact"
  48. uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # tag=v4.5.0
  49. with:
  50. name: SARIF file
  51. path: results.sarif
  52. retention-days: 5
  53. # Upload the results to GitHub's code scanning dashboard.
  54. - name: "Upload to code-scanning"
  55. uses: github/codeql-action/upload-sarif@3096afedf9873361b2b2f65e1445b13272c83eb8 # tag=v2.20.00
  56. with:
  57. sarif_file: results.sarif