name: ClusterFuzzLite Continuous Fuzzing
on:
pull_request:
branches: [main]
paths:
- 'src/**'
- 'fuzz/**'
- '.clusterfuzzlite/**'
push:
branches: [main]
paths:
- 'src/**'
- 'fuzz/**'
- '.clusterfuzzlite/**'
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
permissions:
contents: read
issues: write
pull-requests: write
security-events: write
jobs:
pr-fuzzing:
name: PR Fuzzing
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
sanitizer: [address]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
sanitizer: ${{ matrix.sanitizer }}
language: rust
- name: Run Fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 300 mode: 'code-change'
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
- name: Upload SARIF
if: always() && steps.run.outcome == 'failure'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.run.outputs.sarif }}
batch-fuzzing:
name: Batch Fuzzing
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
sanitizer: [address]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
sanitizer: ${{ matrix.sanitizer }}
language: rust
- name: Run Fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600 mode: 'batch'
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
- name: Upload SARIF
if: always() && steps.run.outcome == 'failure'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.run.outputs.sarif }}
continuous-fuzzing:
name: Continuous Fuzzing
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
sanitizer: [address]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
sanitizer: ${{ matrix.sanitizer }}
language: rust
- name: Run Fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 3600 mode: 'batch'
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
- name: Upload SARIF
if: always() && steps.run.outcome == 'failure'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.run.outputs.sarif }}
prune:
name: Prune Corpus
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
steps:
- name: Build Fuzzers
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: rust
- name: Run Fuzzers (Prune)
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: 'prune'
coverage:
name: Code Coverage
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Build Fuzzers
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
sanitizer: coverage
language: rust
- name: Run Fuzzers (Coverage)
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: 'coverage'