Files
pezkuwi-subxt/polkadot/.github/workflows/honggfuzz.yml
T
Vincent Ulitzsch 67032af69f Add xcm fuzzer (#3869)
* Extend xcm-simulator with a fuzzer for xcm exec

This commit adds a very basic fuzzer that fuzzes the xcm exectution,
in particular the process_instruction function.

* Update cargo.toml in xcm-simulator-fuzzer

* Add xcm-fuzzer to honggfuzz workflow

* Update Cargo.lock

* Update xcm/xcm-simulator/fuzzer/Cargo.toml so honggfuzz shows up on top

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* Update relay_chain.rs in xcm-fuzzer

* Use MAX_XCM_DECODE_DEPTH instead of hardcoded decode limit in xcm-fuzzer

* Add comment on how to generate coverage report in xcm-fuzzer

* fix warnings, fmt, and unused result

* fix compiler

Co-authored-by: Vincent Ulitzsch <vincent.ulitzsch@srlabs.de>
Co-authored-by: Vincent Ulitzsch <vincent@srlabs.de>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2021-10-12 13:37:06 +02:00

138 lines
3.7 KiB
YAML

name: Run nightly fuzzer jobs
on:
schedule:
- cron: '0 0 * * *'
jobs:
xcm-fuzzer:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install minimal stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install minimal nightly Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: wasm32-unknown-unknown
- name: Install honggfuzz deps
run: sudo apt-get install --no-install-recommends binutils-dev libunwind8-dev
- name: Install honggfuzz
uses: actions-rs/cargo@v1
with:
command: install
args: honggfuzz --version "0.5.54"
- name: Build fuzzer binaries
working-directory: xcm/xcm-simulator/fuzzer/
run: cargo hfuzz build
- name: Run fuzzer
working-directory: xcm/xcm-simulator/fuzzer/
run: bash $GITHUB_WORKSPACE/scripts/github/run_fuzzer.sh xcm-fuzzer
erasure-coding-round-trip:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache Seed
id: cache-seed-round-trip
uses: actions/cache@v2
with:
path: erasure-coding/fuzzer/hfuzz_workspace
key: ${{ runner.os }}-erasure-coding
- name: Install minimal stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install minimal nightly Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: wasm32-unknown-unknown
- name: Install honggfuzz deps
run: sudo apt-get install --no-install-recommends binutils-dev libunwind8-dev
- name: Install honggfuzz
uses: actions-rs/cargo@v1
with:
command: install
args: honggfuzz --version "0.5.54"
- name: Build fuzzer binaries
working-directory: erasure-coding/fuzzer
run: cargo hfuzz build
- name: Run fuzzer
working-directory: erasure-coding/fuzzer
run: bash $GITHUB_WORKSPACE/scripts/github/run_fuzzer.sh round_trip
erasure-coding-reconstruct:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache Seed
id: cache-seed-reconstruct
uses: actions/cache@v2
with:
path: erasure-coding/fuzzer/hfuzz_workspace
key: ${{ runner.os }}-erasure-coding
- name: Install minimal stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install minimal nightly Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: wasm32-unknown-unknown
- name: Install honggfuzz deps
run: sudo apt-get install --no-install-recommends binutils-dev libunwind8-dev
- name: Install honggfuzz
uses: actions-rs/cargo@v1
with:
command: install
args: honggfuzz --version "0.5.54"
- name: Build fuzzer binaries
working-directory: erasure-coding/fuzzer
run: cargo hfuzz build
- name: Run fuzzer
working-directory: erasure-coding/fuzzer
run: bash $GITHUB_WORKSPACE/scripts/github/run_fuzzer.sh reconstruct