zizmor.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: Zizmor Actions Scanner
  2. on:
  3. push:
  4. branches:
  5. - main
  6. paths:
  7. - '.github/workflows/**'
  8. pull_request:
  9. branches:
  10. - main
  11. paths:
  12. - '.github/workflows/**'
  13. permissions:
  14. contents: read
  15. jobs:
  16. detect-noop:
  17. permissions:
  18. actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs
  19. contents: read # for fkirc/skip-duplicate-actions to read and compare commits
  20. runs-on: ubuntu-latest
  21. outputs:
  22. noop: ${{ steps.noop.outputs.should_skip }}
  23. steps:
  24. - uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
  25. with:
  26. egress-policy: audit
  27. - name: Detect No-op Changes
  28. id: noop
  29. uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
  30. with:
  31. github_token: ${{ secrets.GITHUB_TOKEN }}
  32. paths_ignore: '["**.md", "**.png", "**.jpg"]'
  33. do_not_skip: '["workflow_dispatch", "schedule", "push"]'
  34. concurrent_skipping: false
  35. zizmor:
  36. name: Run zizmor 🌈
  37. runs-on: ubuntu-latest
  38. needs: detect-noop
  39. if: needs.detect-noop.outputs.noop != 'true'
  40. permissions:
  41. security-events: write
  42. steps:
  43. - name: Checkout repository
  44. uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
  45. with:
  46. persist-credentials: false
  47. - name: Run zizmor 🌈
  48. uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d # v0.5.0
  49. with:
  50. inputs: |
  51. .github/
  52. token: ${{ github.token }}
  53. # min-severity: medium
  54. # min-confidence: medium