From 101586c731594e0a4636e48fc40e33abda9fefaf Mon Sep 17 00:00:00 2001 From: ShihCheng Tu Date: Sat, 30 Aug 2025 22:34:27 +0800 Subject: [PATCH 1/3] Add cifuzz config for OSS-Fuzz --- .github/workflows/cifuzz.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 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 00000000000..4c997ca59f5 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,36 @@ +name: CIFuzz +on: [pull_request] +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: cirq + language: python + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: cirq + language: python + fuzz-seconds: 600 + output-sarif: true + - name: Upload Crash + uses: actions/upload-artifact@v4 + 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 + \ No newline at end of file From fd6861412103a75278450b3b58df27296cdf3331 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Thu, 13 Nov 2025 12:02:45 -0800 Subject: [PATCH 2/3] Trim trailing blank line --- .github/workflows/cifuzz.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 4c997ca59f5..b7e29198a07 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -33,4 +33,3 @@ jobs: # Path to SARIF file relative to the root of the repository sarif_file: cifuzz-sarif/results.sarif checkout_path: cifuzz-sarif - \ No newline at end of file From 31f8647feb24f4a22f9b747001ca7b25c2ba492f Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Thu, 13 Nov 2025 12:12:50 -0800 Subject: [PATCH 3/3] Fix case of the "Cirq" project name for oss-fuzz Ref: https://github.com/ToastCheng/oss-fuzz/commit/30b813767b606af3d0a7455a261b01ed9aaa9a8d --- .github/workflows/cifuzz.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index b7e29198a07..f1149c6a1f7 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -11,12 +11,12 @@ jobs: id: build uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: - oss-fuzz-project-name: cirq + oss-fuzz-project-name: Cirq language: python - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: - oss-fuzz-project-name: cirq + oss-fuzz-project-name: Cirq language: python fuzz-seconds: 600 output-sarif: true