| # CIFuzz action for OSS-Fuzz set up of Liblouis. | |
| # CIFuzz documentation: | |
| # - https://google.github.io/oss-fuzz/getting-started/continuous-integration | |
| # Liblouis OSS-Fuzz project: | |
| # - https://github.com/google/oss-fuzz/blob/master/projects/liblouis | |
| # This CI action will build the fuzzers using the Dockerfile and build.sh | |
| # script from the Liblouis OSS-Fuzz project folder. It runs on GitHub's | |
| # servers. | |
| # NOTE: This fuzzer tests both table loading and translation of input. Only the | |
| # translation deals with untrusted input, so only issues reported from the translation | |
| # code are critical, see also SECURITY.md | |
| # NOTE: For now this workflow is disabled (via the github user interface) because | |
| # the fuzzing is run on the OSS-Fuzz infrastructure. It seems of little use to | |
| # run the same thing twice. | |
| name: CIFuzz | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| paths: | |
| - '**.h' | |
| - '**.c' | |
| - 'liblouis/liblouis/liblouis.h.in' | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| Fuzzing: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0 | |
| with: | |
| egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
| - name: Build Fuzzers | |
| id: build | |
| uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@027c5886032f59e952af751069dcb3d4cb134c73 # master | |
| with: | |
| oss-fuzz-project-name: 'liblouis' | |
| language: c | |
| - name: Run Fuzzers | |
| uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@027c5886032f59e952af751069dcb3d4cb134c73 # master | |
| with: | |
| oss-fuzz-project-name: 'liblouis' | |
| fuzz-seconds: 300 | |
| language: c | |
| - name: Upload Crash | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() && steps.build.outcome == 'success' | |
| with: | |
| name: artifacts | |
| path: ./out/artifacts |