From 2699ba4194d73c173e3528e8bb5f432a955889e9 Mon Sep 17 00:00:00 2001 From: manunio Date: Wed, 1 May 2024 23:55:12 +0530 Subject: [PATCH] fuzz: Add cifuzz integration Add cifuzz workflow action to have fuzzers build and run on each PR. This is a service offered by oss-fuzz where askama already runs. cifuzz can help catch shallow bugs, regressions and fuzzing build issues before they are merged into the repository, to do this fuzzing will be run for ~3min. --- .github/workflows/cifuzz.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/cifuzz.yml diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml new file mode 100644 index 000000000..f4474ad1c --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,24 @@ +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: 'askama' + language: rust + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'askama' + language: rust + fuzz-seconds: 180 + - name: Upload Crash + uses: actions/upload-artifact@v3 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts