Skip to content

Fuzz

Fuzz #412

Workflow file for this run

name: Fuzz
on:
push:
branches: ['main']
pull_request:
# Allow manual trigger
workflow_dispatch:
# Run fuzz tests daily
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fuzz:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- fuzz_dtls_packet
- fuzz_record_parse
- fuzz_dtls13_packet
- fuzz_dtls13_record_parse
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- name: Install cargo-fuzz
run: cargo install cargo-fuzz
- name: Cache fuzz corpus
uses: actions/cache@v5
with:
path: fuzz/corpus
key: fuzz-corpus-${{ matrix.target }}-${{ github.sha }}
restore-keys: |
fuzz-corpus-${{ matrix.target }}-
- name: Run fuzz target
run: |
cargo fuzz run ${{ matrix.target }} -- \
-max_total_time=60 \
-max_len=65536
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: crash-${{ matrix.target }}
path: fuzz/artifacts/${{ matrix.target }}/