Skip to content
Latchkey

Fuzz tests workflow (corazawaf/coraza)

The Fuzz tests workflow from corazawaf/coraza, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: corazawaf/coraza.github/workflows/fuzz.ymlLicense Apache-2.0View source

What it does

This is the Fuzz tests workflow from the corazawaf/coraza repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Fuzz tests

on:
  schedule:
    # https://crontab.guru/#05_14_*_*_*
    - cron: "05 14 * * *"
  workflow_dispatch:

permissions: {}

jobs:
  fuzz:
    name: Fuzz tests
    runs-on: ubuntu-latest
    permissions:
      contents: read
      issues: write
    steps:
      - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
      - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
        with:
          go-version: ">=1.25.0"
      - run: go run mage.go fuzz
      - run: |
          gh issue create --title "$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER failed" \
                          --body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
        if: failure() && github.run_attempt == 1
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Fuzz tests
 
on:
  schedule:
    # https://crontab.guru/#05_14_*_*_*
    - cron: "05 14 * * *"
  workflow_dispatch:
 
permissions: {}
 
jobs:
  fuzz:
    timeout-minutes: 30
    name: Fuzz tests
    runs-on: latchkey-small
    permissions:
      contents: read
      issues: write
    steps:
      - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
      - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
        with:
          go-version: ">=1.25.0"
      - run: go run mage.go fuzz
      - run: |
          gh issue create --title "$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER failed" \
                          --body "See [$GITHUB_WORKFLOW #$GITHUB_RUN_NUMBER](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)."
        if: failure() && github.run_attempt == 1
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 

What changed

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow