scorecard.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. if: github.repository == 'emqx/emqx'
  18. name: Scorecard analysis
  19. runs-on: ubuntu-22.04
  20. permissions:
  21. security-events: write
  22. id-token: write
  23. steps:
  24. - name: "Checkout code"
  25. uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
  26. with:
  27. persist-credentials: false
  28. - name: "Run analysis"
  29. uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
  30. with:
  31. results_file: results.sarif
  32. results_format: sarif
  33. # - Publish results to OpenSSF REST API for easy access by consumers
  34. # - Allows the repository to include the Scorecard badge.
  35. # - See https://github.com/ossf/scorecard-action#publishing-results.
  36. publish_results: true
  37. - name: "Upload artifact"
  38. uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
  39. with:
  40. name: SARIF file
  41. path: results.sarif
  42. retention-days: 5
  43. # Upload the results to GitHub's code scanning dashboard.
  44. - name: "Upload to code-scanning"
  45. uses: github/codeql-action/upload-sarif@7e187e1c529d80bac7b87a16e7a792427f65cf02 # v2.22.1
  46. with:
  47. sarif_file: results.sarif