diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile index 1617da29f..88aaa3fcf 100644 --- a/.clusterfuzzlite/Dockerfile +++ b/.clusterfuzzlite/Dockerfile @@ -7,7 +7,5 @@ RUN sed -i -e '/^#\s*deb-src.*\smain\s\+restricted/s/^#//' /etc/apt/sources.list # libbpf build dependencies \ apt-get install -y --no-install-recommends libz-dev libz-dev:i386 COPY .clusterfuzzlite/build.sh $SRC -RUN git clone --depth 1 https://github.com/libbpf/libbpf -WORKDIR libbpf COPY . $SRC/libbpf WORKDIR $SRC/libbpf diff --git a/.github/workflows/cflite_batch.yml b/.github/workflows/cflite_batch.yml index 645b6c57b..d0b0dc2b2 100644 --- a/.github/workflows/cflite_batch.yml +++ b/.github/workflows/cflite_batch.yml @@ -1,7 +1,7 @@ name: ClusterFuzzLite batch fuzzing on: schedule: - - cron: '0/10 * * * *' + - cron: '0 0/2 * * *' permissions: read-all jobs: BatchFuzzing: diff --git a/.github/workflows/cflite_prune.yml b/.github/workflows/cflite_prune.yml new file mode 100644 index 000000000..4274d59ce --- /dev/null +++ b/.github/workflows/cflite_prune.yml @@ -0,0 +1,19 @@ +name: ClusterFuzzLite prune +on: + schedule: + - cron: '0/10 0 * * *' +permissions: read-all +jobs: + Pruning: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + id: build + uses: google/clusterfuzzlite/actions/build_fuzzers@v1 + - name: Run Fuzzers + id: run + uses: google/clusterfuzzlite/actions/run_fuzzers@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fuzz-seconds: 180 + mode: 'prune' diff --git a/scripts/build-fuzzers.sh b/scripts/build-fuzzers.sh index cd738d2dd..26cacbe0d 100755 --- a/scripts/build-fuzzers.sh +++ b/scripts/build-fuzzers.sh @@ -55,6 +55,4 @@ make -C src -j$(nproc) CFLAGS="-I$elfutils/libelf $CFLAGS" BUILD_STATIC_ONLY=y V $CC $CFLAGS -Isrc -Iinclude -Iinclude/uapi -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c .clusterfuzzlite/bpf-object-fuzzer.c -o bpf-object-fuzzer.o $CXX $CXXFLAGS $LIB_FUZZING_ENGINE bpf-object-fuzzer.o src/libbpf.a "$elfutils/libelf/libelf.a" -l:libz.a -o "$OUT/bpf-object-fuzzer" -wget -O "$OUT/bpf-object-fuzzer_seed_corpus.zip" https://storage.googleapis.com/libbpf-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/libbpf_bpf-object-fuzzer/public.zip - rm -rf "$elfutils"