Skip to content

Commit 6dd1d00

Browse files
committed
ci: run the fuzz target on PRs
using https://google.github.io/oss-fuzz/getting-started/continuous-integration/ It downloads the corpus OSS-Fuzz has accumulated so far (including the test cases that triggered issues in the past) and runs the fuzz target with it. It should help to catch most regressions when PRs are opened. Prompted by #4373.
1 parent 651df57 commit 6dd1d00

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/cifuzz.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CIFuzz
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
Fuzzing:
12+
runs-on: ubuntu-latest
13+
if: github.repository == 'secdev/scapy'
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
steps:
19+
- name: Build Fuzzers
20+
id: build
21+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
22+
with:
23+
oss-fuzz-project-name: 'scapy'
24+
language: python
25+
dry-run: false
26+
allowed-broken-targets-percentage: 0
27+
- name: Run Fuzzers
28+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
29+
with:
30+
oss-fuzz-project-name: 'scapy'
31+
language: python
32+
dry-run: false
33+
fuzz-seconds: 300
34+
- name: Upload Crash
35+
uses: actions/upload-artifact@v4
36+
if: failure() && steps.build.outcome == 'success'
37+
with:
38+
name: artifacts
39+
path: ./out/artifacts

0 commit comments

Comments
 (0)