diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml new file mode 100644 index 00000000..be20de49 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,27 @@ +# OSS-Fuzz continuous integration: +# https://google.github.io/oss-fuzz/getting-started/continuous-integration/ + +name: CIFuzz +on: [pull_request] +jobs: + Fuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'exiv2' + dry-run: false + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'exiv2' + fuzz-seconds: 600 + dry-run: false + - name: Upload Crash + uses: actions/upload-artifact@v1 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts diff --git a/CMakeLists.txt b/CMakeLists.txt index f51cdf33..88a32587 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,11 @@ option( EXIV2_BUILD_DOC "Add 'doc' target to generate documentatio option( EXIV2_TEAM_EXTRA_WARNINGS "Add more sanity checks using compiler flags" OFF ) option( EXIV2_TEAM_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF ) option( EXIV2_TEAM_USE_SANITIZERS "Enable ASAN and UBSAN when available" OFF ) + +# The EXIV2_TEAM_OSS_FUZZ option is used by the OSS-Fuzz build script: +# https://github.com/google/oss-fuzz/tree/master/projects/exiv2/build.sh option( EXIV2_TEAM_OSS_FUZZ "Build config for OSS-Fuzz" OFF ) + option( EXIV2_TEAM_PACKAGING "Additional stuff for generating packages" OFF ) set(EXTRA_COMPILE_FLAGS " ") diff --git a/README.md b/README.md index d4dd06d3..f3e9e73e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -| Codecov | Repology | Chat | -| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| [](https://codecov.io/gh/Exiv2/exiv2) | [](https://repology.org/metapackage/exiv2/versions) | [](https://matrix.to/#/#exiv2-chat:matrix.org) | +| Codecov | OSS-Fuzz | Repology | Chat | +| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| [](https://codecov.io/gh/Exiv2/exiv2) | [](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:exiv2) | [](https://repology.org/metapackage/exiv2/versions) | [](https://matrix.to/#/#exiv2-chat:matrix.org) | CI Status: @@ -65,6 +65,7 @@ The file ReadMe.txt in a build bundle describes how to install the library on th 4. [Python tests](#4-4) 5. [Test Summary](#4-5) 6. [Fuzzing](#4-6) + 1. [OSS-Fuzz](#4-6-1) 5. [Platform Notes](#5) 1. [Linux](#5-1) 2. [macOS](#5-2) @@ -1085,6 +1086,15 @@ mkdir corpus For more information about fuzzing see [`fuzz/README.md`](fuzz/README.md). +[TOC](#TOC) +