From ef46e6ccd0c3f94db884e8052defcb816e8caa3f Mon Sep 17 00:00:00 2001 From: AYA Date: Tue, 6 Aug 2024 11:20:53 +0200 Subject: [PATCH 1/2] Adding CIFuzz to Actions --- .github/workflows/cifuzz.yml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 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 00000000000000..d5a325cbf965e1 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,39 @@ +name: CIFuzz +on: + pull_request: + paths: + - '**.cpp' + - '**.h' +permissions: {} +jobs: + Fuzzing: + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'connectedhomeip' + language: c++ + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'connectedhomeip' + language: c++ + fuzz-seconds: 300 + output-sarif: true + - name: Upload Crash + uses: actions/upload-artifact@v3 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts + - name: Upload Sarif + if: always() && steps.build.outcome == 'success' + uses: github/codeql-action/upload-sarif@v2 + with: + # Path to SARIF file relative to the root of the repository + sarif_file: cifuzz-sarif/results.sarif + checkout_path: cifuzz-sarif From 2f06d34056a3bca770ad6c770311b60ab5b2c614 Mon Sep 17 00:00:00 2001 From: AYA Date: Tue, 6 Aug 2024 14:56:20 +0200 Subject: [PATCH 2/2] set dry-run to true --- .github/workflows/cifuzz.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index d5a325cbf965e1..32a1230ca558b6 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -17,6 +17,7 @@ jobs: with: oss-fuzz-project-name: 'connectedhomeip' language: c++ + dry-run: true - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: @@ -24,6 +25,7 @@ jobs: language: c++ fuzz-seconds: 300 output-sarif: true + dry-run: true - name: Upload Crash uses: actions/upload-artifact@v3 if: failure() && steps.build.outcome == 'success'