supply_chain.yml 2.5 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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  33. with:
  34. persist-credentials: false
  35. - name: "Run analysis"
  36. uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
  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@184d73b71b93c222403b2e7f1ffebe4508014249 # 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@af56b044b5d41c317aef5d19920b3183cb4fbbec # v2.2.4
  55. with:
  56. sarif_file: results.sarif