Skip to content

Fuzzing

Fuzzing #15

Workflow file for this run

name: Fuzzing
on:
schedule:
- cron: '0 7 * * 1' # Runs at 07:00 on monday every week
workflow_dispatch:
permissions:
contents: read
jobs:
fuzzing:
name: Fuzzing
runs-on: ubuntu-22.04
if: github.event.repository.fork == false
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Bazel
run: |
sudo apt-get update
sudo apt-get install -y wget
wget -c https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64
chmod +x bazelisk-linux-amd64
sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel
bazel --version
- name: Install Fuzzing Dependencies
run: |
pip install --upgrade atheris
pip install --upgrade atheris-libprotobuf-mutator
pip install --upgrade protobuf
- name: Install Cve-bin-tool
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade -r dev-requirements.txt
python -m pip install --upgrade .
- name: Run Fuzzing
id: fuzzing
env:
PYTHONPATH: ${{ github.workspace }}
run: |
cd fuzz
export PYTHONPATH="$PYTHONPATH:/generated"
fuzzing_scripts=($(ls *.py))
echo "Found Fuzzing scripts: ${fuzzing_scripts[@]}"
current_week=($(date -u +%U))
echo "Current week number: $current_week"
at_index=$((($(date -u +%U) % ${#fuzzing_scripts[@]})))
selected_script="${fuzzing_scripts[$at_index]}"
echo "Selected script: $selected_script"
timeout --preserve-status --signal=SIGINT 60m python $selected_script