From 79b17e4b1a756ba5f3e2c06c301c1034f52c0cbd Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sun, 27 Dec 2020 18:09:35 +0100 Subject: [PATCH 1/7] Add CIFuzz Github Action --- .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..d7f2a5bad --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,24 @@ +name: CIFuzz +on: [push,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: 'pillow' + dry-run: false + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'pillow' + 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 From a12aa59e8beb4cda1c1599f6eb8471df872b8340 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sat, 20 Feb 2021 12:44:49 +0100 Subject: [PATCH 2/7] Add language parameter ref: https://github.com/google/oss-fuzz/pull/5222 --- .github/workflows/cifuzz.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index d7f2a5bad..04fc152a0 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -9,12 +9,14 @@ jobs: uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: oss-fuzz-project-name: 'pillow' + language: python dry-run: false - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: 'pillow' fuzz-seconds: 600 + language: python dry-run: false - name: Upload Crash uses: actions/upload-artifact@v1 From f194d9e6e220ef4f7eedae3d824e8ff0ef068abf Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sat, 27 Feb 2021 11:46:19 +0100 Subject: [PATCH 3/7] Keep errors if they're "known" --- .github/workflows/cifuzz.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 04fc152a0..fbfd673c0 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -12,15 +12,22 @@ jobs: language: python dry-run: false - name: Run Fuzzers + id: run uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: oss-fuzz-project-name: 'pillow' fuzz-seconds: 600 language: python dry-run: false - - name: Upload Crash - uses: actions/upload-artifact@v1 + - name: Upload New Crash + uses: actions/upload-artifact@v2 if: failure() && steps.build.outcome == 'success' with: name: artifacts path: ./out/artifacts + - name: Upload Legacy Crash + uses: actions/upload-artifact@v2 + if: steps.run.outcome == 'success': + with: + name: crash + path: ./out/crash* From 2d52a9fcf20a0e601da0ec5d990d4db909c69265 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sat, 27 Feb 2021 11:54:33 +0100 Subject: [PATCH 4/7] Syntax --- .github/workflows/cifuzz.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index fbfd673c0..076f5300d 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -27,7 +27,7 @@ jobs: path: ./out/artifacts - name: Upload Legacy Crash uses: actions/upload-artifact@v2 - if: steps.run.outcome == 'success': + if: steps.run.outcome == 'success' with: name: crash path: ./out/crash* From 95884c6b2d99364ba9424671dad0c4253e989d30 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sat, 27 Feb 2021 12:54:38 +0100 Subject: [PATCH 5/7] Riun on .c/.h --- .github/workflows/cifuzz.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 076f5300d..96506fabe 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,5 +1,16 @@ name: CIFuzz -on: [push,pull_request] +on: + push: + paths: + - "**.yml" # testing, remove me + - "**.c" + - "**.h" + pull_request: + paths: + - "**.yml" # testing, remove me + - "**.c" + - "**.h" + jobs: Fuzzing: runs-on: ubuntu-latest From aa0b982ef61b1ee4df7ff312b097c1e4ca36eae4 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Sun, 28 Feb 2021 17:17:33 +0100 Subject: [PATCH 6/7] Added failure if out/crash-* exists --- .github/workflows/cifuzz.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 96506fabe..e158bd84d 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -42,3 +42,8 @@ jobs: with: name: crash path: ./out/crash* + - name: Fail on legacy crash + if: success() + run: | + [ ! -e out/crash-* ] + echo No legacy crash detected From 3c96fbf908b735a58bd39e663c5d5ad7350bbf5a Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Mon, 1 Mar 2021 21:03:26 +0100 Subject: [PATCH 7/7] Removed "Remove me" testing lines --- .github/workflows/cifuzz.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index e158bd84d..9fe8f774f 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -2,12 +2,10 @@ name: CIFuzz on: push: paths: - - "**.yml" # testing, remove me - "**.c" - "**.h" pull_request: paths: - - "**.yml" # testing, remove me - "**.c" - "**.h"