| 1 |
name: Code Fuzzer |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
branches: [main] |
| 6 |
push: |
| 7 |
branches: [main] |
| 8 |
|
| 9 |
permissions: |
| 10 |
contents: read |
| 11 |
|
| 12 |
jobs: |
| 13 |
fuzzer: |
| 14 |
name: OSS-Fuzz Code Testing |
| 15 |
concurrency: |
| 16 |
group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ matrix.architecture }}-${{ github.ref }} |
| 17 |
cancel-in-progress: true |
| 18 |
if: github.repository == 'bus1/dbus-broker' |
| 19 |
runs-on: ubuntu-latest |
| 20 |
|
| 21 |
strategy: |
| 22 |
fail-fast: false |
| 23 |
matrix: |
| 24 |
architecture: [x86_64] |
| 25 |
sanitizer: [address, undefined, memory] |
| 26 |
include: |
| 27 |
- architecture: i386 |
| 28 |
sanitizer: address |
| 29 |
|
| 30 |
steps: |
| 31 |
- name: Build Fuzzers (${{ matrix.sanitizer }}) |
| 32 |
id: build |
| 33 |
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master |
| 34 |
with: |
| 35 |
allowed-broken-targets-percentage: 0 |
| 36 |
architecture: ${{ matrix.architecture }} |
| 37 |
dry-run: false |
| 38 |
oss-fuzz-project-name: 'dbus-broker' |
| 39 |
sanitizer: ${{ matrix.sanitizer }} |
| 40 |
- name: Run Fuzzers (${{ matrix.sanitizer }}) |
| 41 |
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master |
| 42 |
with: |
| 43 |
dry-run: false |
| 44 |
fuzz-seconds: 600 |
| 45 |
oss-fuzz-project-name: 'dbus-broker' |
| 46 |
sanitizer: ${{ matrix.sanitizer }} |
| 47 |
- name: Upload Crash |
| 48 |
if: failure() && steps.build.outcome == 'success' |
| 49 |
uses: actions/upload-artifact@v4 |
| 50 |
with: |
| 51 |
name: ${{ matrix.sanitizer }}-${{ matrix.architecture }}-artifacts |
| 52 |
path: ./out/artifacts |