scorecard.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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: '43 6 * * 5'
  10. push:
  11. branches: [ "main" ]
  12. # Declare default permissions as read only.
  13. permissions: read-all
  14. jobs:
  15. analysis:
  16. name: Scorecard analysis
  17. runs-on: ubuntu-latest
  18. permissions:
  19. # Needed to upload the results to code-scanning dashboard.
  20. security-events: write
  21. # Needed to publish results and get a badge (see publish_results below).
  22. id-token: write
  23. # Uncomment the permissions below if installing in a private repository.
  24. # contents: read
  25. # actions: read
  26. steps:
  27. - name: "Checkout code"
  28. uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
  29. with:
  30. persist-credentials: false
  31. - name: "Run analysis"
  32. uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
  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. # - you are installing Scorecard on a *private* repository
  39. # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
  40. # repo_token: ${{ secrets.SCORECARD_TOKEN }}
  41. # Public repositories:
  42. # - Publish results to OpenSSF REST API for easy access by consumers
  43. # - Allows the repository to include the Scorecard badge.
  44. # - See https://github.com/ossf/scorecard-action#publishing-results.
  45. # For private repositories:
  46. # - `publish_results` will always be set to `false`, regardless
  47. # of the value entered here.
  48. publish_results: true
  49. # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
  50. # format to the repository Actions tab.
  51. - name: "Upload artifact"
  52. uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
  53. with:
  54. name: SARIF file
  55. path: results.sarif
  56. retention-days: 5
  57. # Upload the results to GitHub's code scanning dashboard.
  58. - name: "Upload to code-scanning"
  59. uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
  60. with:
  61. sarif_file: results.sarif