Skip to content

Refactor socketioxide parsing #8

Refactor socketioxide parsing

Refactor socketioxide parsing #8

Workflow file for this run

name: fuzzing
on: [pull_request]
permissions:
contents: read
jobs:
fuzzing:
strategy:
fail-fast: false
matrix:
crate: [parser-common, parser-msgpack]
environment: dev
runs-on: ubuntu-latest
env:
TEST_DATA_VERSION: 0.0.2
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-fuzzing
- run: cargo install cargo-fuzz
- name: download corpus data
run: |
cd crates/${{ matrix.crate }}
wget https://github.com/Totodore/socketioxide-fuzzing-corpus/archive/refs/tags/v$TEST_DATA_VERSION.zip
unzip v$TEST_DATA_VERSION.zip
rm v$TEST_DATA_VERSION.zip
- name: cargo fuzz run decode_value
run: |
cd crates/${{ matrix.crate }}
cargo fuzz run decode_value -- -timeout=5 -max_len=2048 -runs=2000000 -only_ascii=1 \
socketioxide-fuzzing-corpus-$TEST_DATA_VERSION/corpus-${{ matrix.crate }}