ci: limit ClusterFuzzLite workflow to src/ and .clusterfuzzlite/ chan… #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ClusterFuzzLite | |
| on: | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - ".clusterfuzzlite/**" | |
| - "pyproject.toml" | |
| - "generate_proto.py" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "src/**" | |
| - ".clusterfuzzlite/**" | |
| - "pyproject.toml" | |
| - "generate_proto.py" | |
| permissions: read-all | |
| jobs: | |
| # ── PR fuzzing ──────────────────────────────────────────────────────────── | |
| # Runs on every pull request and reports any new crashes found in the | |
| # changed code paths (code-change mode). | |
| PR: | |
| if: github.event_name == 'pull_request' | |
| runs-on: hl-sdk-py-lin-md | |
| concurrency: | |
| group: ${{ github.workflow }}-pr-${{ matrix.sanitizer }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sanitizer: | |
| - address | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - name: Build Fuzzers (${{ matrix.sanitizer }}) | |
| id: build | |
| uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1 | |
| with: | |
| language: python | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| sanitizer: ${{ matrix.sanitizer }} | |
| - name: Run Fuzzers (${{ matrix.sanitizer }}) | |
| id: run | |
| uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| fuzz-seconds: 600 | |
| mode: code-change | |
| sanitizer: ${{ matrix.sanitizer }} | |
| output-sarif: true | |
| # ── Continuous builds ───────────────────────────────────────────────────── | |
| # Uploads a fresh fuzzer build artifact on every push to main so that PR | |
| # fuzzing can determine whether a crash was newly introduced. | |
| Build: | |
| if: github.event_name == 'push' | |
| runs-on: hl-sdk-py-lin-md | |
| concurrency: | |
| group: ${{ github.workflow }}-build-${{ matrix.sanitizer }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sanitizer: | |
| - address | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 | |
| with: | |
| egress-policy: audit | |
| - name: Build Fuzzers (${{ matrix.sanitizer }}) | |
| id: build | |
| uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1 | |
| with: | |
| language: python | |
| sanitizer: ${{ matrix.sanitizer }} | |
| upload-build: true |