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@b09bb98e06d4d774595224525879c09bc6e98c40 # v2.20.1
  25. with:
  26. egress-policy: audit
  27. - name: Detect No-op Changes
  28. id: noop
  29. uses: fkirc/skip-duplicate-actions@b974a9395958c231af965b70070979a577efa578 # v5.3.2
  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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
  45. with:
  46. persist-credentials: false
  47. - name: Run zizmor 🌈
  48. uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
  49. with:
  50. inputs: |
  51. .github/
  52. token: ${{ github.token }}
  53. # min-severity: medium
  54. # min-confidence: medium