From 9669b94922ae0d57b3579f1c9ffaab086868a0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bojl=C3=A9n?= Date: Sun, 21 Jun 2026 12:20:57 +0100 Subject: [PATCH] ci: add zizmor GitHub Actions security analysis Add a zizmor workflow that audits GitHub Actions on push/PR to main, mirroring the setup in shroud.email (adapted to ubuntu-latest runners). Manage pinact + zizmor via mise, pin all action references to commit SHAs with pinact, and set persist-credentials: false on the build checkout to satisfy zizmor's artipacked audit. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/build.yml | 12 +++++++----- .github/workflows/zizmor.yml | 27 +++++++++++++++++++++++++++ mise.toml | 3 +++ 3 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/zizmor.yml create mode 100644 mise.toml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55271da..2cc202f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,22 +17,24 @@ jobs: permissions: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + with: + persist-credentials: false - name: Log in to the container registry - uses: docker/login-action@v2 + uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 - name: Build container - uses: docker/build-push-action@v3 + uses: docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6 # v3.3.1 with: context: ./haraka push: true diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 0000000..19821bc --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,27 @@ +name: GitHub Actions Security Analysis with zizmor 🌈 + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +permissions: {} + +jobs: + zizmor: + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + steps: + - name: Checkout repository + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false + + - name: Run zizmor 🌈 + uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 + with: + advanced-security: false + annotations: true diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..e7dbdbb --- /dev/null +++ b/mise.toml @@ -0,0 +1,3 @@ +[tools] +pinact = "4.1.0" +zizmor = "1.25.2"