summaryrefslogtreecommitdiff
path: root/.github/workflows/json4cpp-fuzz.yml
blob: dffe6adffc0496c00c0cf2772051b5f07f1fbf20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "json4cpp: Fuzz"

on:
  workflow_dispatch:
  workflow_call:

concurrency:
  group: json4cpp-fuzz-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  fuzzing:
    name: Fuzzing
    runs-on: ubuntu-22.04
    steps:
    - name: Harden Runner
      uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
      with:
        egress-policy: audit

    - name: Build Fuzzers
      id: build
      uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
      with:
        oss-fuzz-project-name: 'json'
        dry-run: false
        language: c++
    - name: Run Fuzzers
      uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
      with:
        oss-fuzz-project-name: 'json'
        fuzz-seconds: 300
        dry-run: false
        language: c++
    - name: Upload Crash
      uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
      if: failure() && steps.build.outcome == 'success'
      with:
        name: json4cpp-fuzz-artifacts
        path: ./out/artifacts