1# Copyright (c) 2022 Yubico AB. All rights reserved. 2# Use of this source code is governed by a BSD-style 3# license that can be found in the LICENSE file. 4# SPDX-License-Identifier: BSD-2-Clause 5 6name: cifuzz 7 8on: 9 pull_request: 10 branches: 11 - main 12 push: 13 branches: 14 - main 15 - '*-ci' 16 17jobs: 18 fuzzing: 19 if: github.repository == 'Yubico/libfido2' 20 runs-on: ubuntu-20.04 21 strategy: 22 fail-fast: false 23 matrix: 24 sanitizer: [address, undefined, memory] 25 steps: 26 - name: build fuzzers (${{ matrix.sanitizer }}) 27 uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master 28 with: 29 oss-fuzz-project-name: 'libfido2' 30 language: c 31 sanitizer: ${{ matrix.sanitizer }} 32 dry-run: false 33 - name: run fuzzers (${{ matrix.sanitizer }}) 34 uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master 35 with: 36 oss-fuzz-project-name: 'libfido2' 37 language: c 38 sanitizer: ${{ matrix.sanitizer }} 39 fuzz-seconds: 600 40 dry-run: false 41 - name: upload crash 42 uses: actions/upload-artifact@v3 43 if: failure() 44 with: 45 name: ${{ matrix.sanitizer }}-artifacts 46 path: ./out/artifacts 47