supply_chain.yml 2.4 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. # Check current WASM Micro Runtime results here: https://securityscorecards.dev/viewer/?uri=github.com/bytecodealliance/wasm-micro-runtime
  5. name: Scorecard supply-chain security
  6. on:
  7. # For Branch-Protection check. Only the default branch is supported. See
  8. # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
  9. branch_protection_rule:
  10. # To guarantee Maintained check is occasionally updated. See
  11. # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
  12. # midnight UTC
  13. schedule:
  14. - cron: "0 0 * * *"
  15. # allow to be triggered manually
  16. workflow_dispatch:
  17. # Declare default permissions as read only.
  18. permissions:
  19. contents: read
  20. jobs:
  21. analysis:
  22. name: Scorecard analysis
  23. runs-on: ubuntu-latest
  24. if: github.repository == 'bytecodealliance/wasm-micro-runtime'
  25. permissions:
  26. # Needed to upload the results to code-scanning dashboard.
  27. security-events: write
  28. # Needed to publish results and get a badge (see publish_results below).
  29. id-token: write
  30. steps:
  31. - name: "Checkout code"
  32. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v3.1.0
  33. with:
  34. persist-credentials: false
  35. - name: "Run analysis"
  36. uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
  37. with:
  38. results_file: results.sarif
  39. results_format: sarif
  40. # - Publish results to OpenSSF REST API for easy access by consumers
  41. # - Allows the repository to include the Scorecard badge.
  42. # - See https://github.com/ossf/scorecard-action#publishing-results.
  43. publish_results: true
  44. # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
  45. # format to the repository Actions tab.
  46. - name: "Upload artifact"
  47. uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v3.1.0
  48. with:
  49. name: SARIF file
  50. path: results.sarif
  51. retention-days: 5
  52. # Upload the results to GitHub's code scanning dashboard.
  53. - name: "Upload to code-scanning"
  54. uses: github/codeql-action/upload-sarif@4b675e451b3779918647db783e324bd9fd7f3932
  55. with:
  56. sarif_file: results.sarif