Skip to content

gha: add ClusterFuzzLite to ci #3

gha: add ClusterFuzzLite to ci

gha: add ClusterFuzzLite to ci #3

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# umoci: Umoci Modifies Open Containers' Images
# Copyright (C) 2016-2025 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: ClusterFuzzLite
on:
pull_request: # TODO: Remove me.
branches: [ main ]
schedule:
- cron: '0 0 * * 0' # once a week
permissions: read-all
jobs:
batch:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer:
- address
#- undefined # currently ubsan has build failures
- memory
steps:
- name: build fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: go
github-token: ${{ secrets.GITHUB_TOKEN }}
sanitizer: ${{ matrix.sanitizer }}
storage-repo: https://${{ secrets.FUZZ_CORPUS_TOKEN }}@github.com/cyphar/umoci-fuzz-corpus.git
- name: run fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 3600
mode: 'batch'
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
storage-repo: https://${{ secrets.FUZZ_CORPUS_TOKEN }}@github.com/cyphar/umoci-fuzz-corpus.git
prune:
runs-on: ubuntu-latest
needs:
- batch
steps:
- name: build fuzzers
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: go
- name: run fuzzers (prune)
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: 'prune'
output-sarif: true
storage-repo: https://${{ secrets.FUZZ_CORPUS_TOKEN }}@github.com/cyphar/umoci-fuzz-corpus.git
coverage:
runs-on: ubuntu-latest
needs:
- batch
strategy:
fail-fast: false
matrix:
sanitizer:
- coverage
steps:
- name: build fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: go
github-token: ${{ secrets.GITHUB_TOKEN }}
sanitizer: ${{ matrix.sanitizer }}
storage-repo: https://${{ secrets.FUZZ_CORPUS_TOKEN }}@github.com/cyphar/umoci-fuzz-corpus.git
- name: run fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: 'coverage'
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
storage-repo: https://${{ secrets.FUZZ_CORPUS_TOKEN }}@github.com/cyphar/umoci-fuzz-corpus.git