scorecard.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # This workflow uses actions that are not certified by GitHub. They are provided
  2. # by a third-party and are governed by separate terms of service, privacy
  3. # policy, and support documentation.
  4. name: Scorecard supply-chain security
  5. on:
  6. # For Branch-Protection check. Only the default branch is supported. See
  7. # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
  8. branch_protection_rule:
  9. # To guarantee Maintained check is occasionally updated. See
  10. # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
  11. schedule:
  12. - cron: '26 14 * * 5'
  13. push:
  14. branches: [ "master" ]
  15. # Declare default permissions as read only.
  16. permissions: read-all
  17. jobs:
  18. analysis:
  19. name: Scorecard analysis
  20. runs-on: ubuntu-latest
  21. permissions:
  22. # Needed to upload the results to code-scanning dashboard.
  23. security-events: write
  24. # Needed to publish results and get a badge (see publish_results below).
  25. id-token: write
  26. steps:
  27. - name: "Checkout code"
  28. uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
  29. with:
  30. persist-credentials: false
  31. - name: "Run analysis"
  32. uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
  33. with:
  34. results_file: results.sarif
  35. results_format: sarif
  36. # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
  37. # - you want to enable the Branch-Protection check on a *public* repository, or
  38. # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
  39. # repo_token: ${{ secrets.SCORECARD_TOKEN }}
  40. # Public repositories:
  41. # - Publish results to OpenSSF REST API for easy access by consumers
  42. # - Allows the repository to include the Scorecard badge.
  43. # - See https://github.com/ossf/scorecard-action#publishing-results.
  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@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.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@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
  56. with:
  57. sarif_file: results.sarif