Debian Codegraph @

.github/workflows/fuzz.yml

raw
1 name: ClusterFuzzLite
2 on:
3 push:
4 branches:
5 - main
6 pull_request:
7 branches:
8 - main
9 types:
10 - opened
11 - synchronize
12 - reopened
13 schedule:
14 - cron: '0 3 * * 0' # Weekly on Sunday at 03:00 UTC
15 workflow_dispatch:
16
17 permissions:
18 actions: read
19 contents: read
20
21 jobs:
22 # Run for a short window on every PR / push to catch regressions introduced
23 # by the change under review.
24 PR:
25 name: Fuzzing (code-change)
26 if: github.event_name == 'pull_request' || github.event_name == 'push'
27 runs-on: ubuntu-latest
28 concurrency:
29 group: ${{ github.workflow }}-${{ github.ref }}-pr
30 cancel-in-progress: true
31 permissions:
32 actions: read
33 contents: read
34 security-events: write
35 steps:
36 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
37 - name: Build fuzz targets
38 uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
39 with:
40 language: c
41 sanitizer: address
42 - name: Run fuzz targets
43 uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
44 with:
45 github-token: ${{ secrets.GITHUB_TOKEN }}
46 fuzz-seconds: 60
47 mode: code-change
48 sanitizer: address
49 output-sarif: true
50 - name: Upload SARIF results
51 if: always() && hashFiles('sarif-results/address.sarif') != ''
52 uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
53 with:
54 sarif_file: sarif-results/address.sarif
55
56 # Run longer on a schedule to build up a persistent corpus and surface
57 # crashes that require deeper exploration.
58 batch:
59 name: Fuzzing (batch)
60 if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
61 runs-on: ubuntu-latest
62 permissions:
63 actions: read
64 contents: read
65 security-events: write
66 steps:
67 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
68 - name: Build fuzz targets
69 uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
70 with:
71 language: c
72 sanitizer: address
73 - name: Run fuzz targets
74 uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1
75 with:
76 github-token: ${{ secrets.GITHUB_TOKEN }}
77 fuzz-seconds: 3600
78 mode: batch
79 sanitizer: address