Remove oss-fuzz ci, add custom fuzzing ci

This commit is contained in:
ado 2024-03-03 01:50:54 +01:00
parent 880266bf61
commit 805196a636
3 changed files with 33 additions and 35 deletions

View File

@ -1,4 +1,4 @@
name: coverage-ci name: fuzz-ci
on: on:
workflow_dispatch: workflow_dispatch:
@ -18,39 +18,40 @@ on:
- bugfix/** - bugfix/**
jobs: jobs:
fuzzing: clang_tests:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: "Fuzzing" name: "Fuzzing"
container:
image: silkeh/clang:15
options: -v /usr/local:/host_usr_local
env:
CC: clang
CXX: clang++
CXXFLAGS: -stdlib=libc++
steps: steps:
- name: Build Fuzzers - uses: actions/checkout@v1
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'ssp'
language: c++
- name: Run Fuzzers - uses: friendlyanon/fetch-core-count@v1
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master id: cores
with:
oss-fuzz-project-name: 'ssp'
language: c++
fuzz-seconds: 60
output-sarif: true
- name: Upload Crash - name: Install dependencies
uses: actions/upload-artifact@v3 run: |
if: failure() && steps.build.outcome == 'success' apt-get update
with: apt-get install -y git
name: artifacts script/ci_install_deps.sh
path: ./out/artifacts
- name: Upload Sarif - name: Build
if: always() && steps.build.outcome == 'success' working-directory: fuzz
uses: github/codeql-action/upload-sarif@v2 run: make
with:
# Path to SARIF file relative to the root of the repository - name: Run
sarif_file: cifuzz-sarif/results.sarif working-directory: fuzz
checkout_path: cifuzz-sarif run: ssp_fuz -max_total_time=30
category: CIFuzz

View File

@ -1,5 +0,0 @@
#!/usr/bin/env sh
$CXX $CFLAGS $CXXFLAGS $LIB_FUZZING_ENGINE $SRC/fuzz/ssp_fuzz.cpp
-I $SRC/include
-o $OUT/ssp_fuzz

2
fuzz/makefile Normal file
View File

@ -0,0 +1,2 @@
all:
clang++ -std=c++17 -o ssp_fuzz ssp_fuzz.cpp -g -fsanitize=fuzzer