-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e29bd86
commit c1c9a17
Showing
12 changed files
with
291 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM gcr.io/oss-fuzz-base/base-builder | ||
|
||
RUN echo "CXX=$CXX" | ||
RUN echo "CXXFLAGS=$CXXFLAGS" | ||
|
||
RUN apt update && \ | ||
apt install -y --no-install-recommends \ | ||
ninja-build cmake && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . $SRC/scnlib | ||
WORKDIR $SRC/scnlib | ||
COPY ./.clusterfuzzlite/build.sh $SRC/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -eu | ||
|
||
mkdir build | ||
cd build | ||
|
||
cmake .. \ | ||
-G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=17 \ | ||
-DSCN_DISABLE_TOP_PROJECT=ON -DSCN_FUZZING=ON \ | ||
-DSCN_FUZZING_LDFLAGS="$LIB_FUZZING_ENGINE" | ||
|
||
cmake --build . | ||
|
||
# Binary targets | ||
cp tests/fuzz/scn_fuzz_* "$OUT" | ||
|
||
fuzz_src_dir="$(pwd)/../tests/fuzz" | ||
|
||
# Dictionaries and seed corpora | ||
copy_data() { | ||
cp "$fuzz_src_dir/dictionaries/$1.txt" "$OUT/scn_fuzz_$2.dict" | ||
|
||
zip "$OUT/scn_fuzz_$2_seed_corpus.zip" "$fuzz_src_dir"/seed-corpora/"$1"/* | ||
} | ||
copy_data float float | ||
copy_data format format | ||
copy_data int int | ||
copy_data int roundtrip | ||
copy_data string string | ||
copy_data string string_impl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
homepage: "https://github.com/eliaskosunen/scnlib" | ||
language: c++ | ||
primary_contact: "[email protected]" | ||
main_repo: "https://github.com/eliaskosunen/scnlib.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build*/ | ||
cmake-build*/ | ||
docs/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: ClusterFuzzLite batch fuzzing | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0/6 * * *' # Every 6th hour | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
paths: | ||
- '.github/**' | ||
- 'benchmark/**' | ||
- 'cmake/**' | ||
- 'examples/**' | ||
- 'include/**' | ||
- 'src/**' | ||
- 'tests/**' | ||
- '**/CMakeLists.txt' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
fuzz: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sanitizer: | ||
- address | ||
- undefined | ||
- memory | ||
|
||
steps: | ||
- name: Build fuzzers | ||
id: build | ||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1 | ||
with: | ||
language: c++ | ||
sanitizer: ${{ matrix.sanitizer }} | ||
|
||
- name: Run fuzzers | ||
id: run | ||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fuzz-seconds: 3600 | ||
mode: 'batch' | ||
sanitizer: ${{ matrix.sanitizer }} | ||
output-sarif: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: ClusterFuzzLite PR fuzzing | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
paths: | ||
- '.github/**' | ||
- 'benchmark/**' | ||
- 'cmake/**' | ||
- 'examples/**' | ||
- 'include/**' | ||
- 'src/**' | ||
- 'tests/**' | ||
- '**/CMakeLists.txt' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
fuzz: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sanitizer: | ||
- address | ||
- undefined | ||
- memory | ||
|
||
steps: | ||
- name: Build fuzzers | ||
id: build | ||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1 | ||
with: | ||
language: c++ | ||
sanitizer: ${{ matrix.sanitizer }} | ||
upload-build: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: ClusterFuzzLite cron-jobs | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Once a day at midnight | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
fuzz-prune: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Build fuzzers | ||
id: build | ||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1 | ||
with: | ||
language: c++ | ||
|
||
- name: Run fuzzers | ||
id: run | ||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fuzz-seconds: 600 | ||
mode: 'prune' | ||
output-sarif: true | ||
|
||
fuzz-coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Build fuzzers | ||
id: build | ||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1 | ||
with: | ||
language: c++ | ||
sanitizer: coverage | ||
|
||
- name: Run fuzzers | ||
id: run | ||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fuzz-seconds: 600 | ||
mode: 'coverage' | ||
sanitizer: 'coverage' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: ClusterFuzzLite PR fuzzing | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/**' | ||
- 'benchmark/**' | ||
- 'cmake/**' | ||
- 'examples/**' | ||
- 'include/**' | ||
- 'src/**' | ||
- 'tests/**' | ||
- '**/CMakeLists.txt' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
fuzz: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sanitizer: | ||
- address | ||
- undefined | ||
- memory | ||
|
||
steps: | ||
- name: Build fuzzers | ||
id: build | ||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1 | ||
with: | ||
language: c++ | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
sanitizer: ${{ matrix.sanitizer }} | ||
|
||
- name: Run fuzzers | ||
id: run | ||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
fuzz-seconds: 600 | ||
mode: 'code-change' | ||
sanitizer: ${{ matrix.sanitizer }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters