10000 186 test with clusterfuzzlite by ashearin · Pull Request #8 · ashearin/bomctl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

186 test with clusterfuzzlite #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .clusterfuzzlite/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM gcr.io/oss-fuzz-base/base-builder-go:v1
RUN apt-get update && apt-get install -y make autoconf automake libtool
COPY . $SRC/bomctl
WORKDIR $SRC/bomctl
COPY .clusterfuzzlite/build.sh $SRC/
13 changes: 13 additions & 0 deletions .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash -eu

# build project
# e.g.
# ./autogen.sh
# ./configure
# make -j$(nproc) all

# build fuzzers
# e.g.
# $CXX $CXXFLAGS -std=c++11 -Iinclude \
# /path/to/name_of_fuzzer.cc -o $OUT/name_of_fuzzer \
# $LIB_FUZZING_ENGINE /path/to/library.a
1 change: 1 addition & 0 deletions .clusterfuzzlite/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
language: go

Check warning on line 1 in .clusterfuzzlite/project.yaml

View workflow job for this annotation

GitHub Actions / yamllint

1:1 [document-start] missing document start "---"
69 changes: 69 additions & 0 deletions .github/workflows/cflite-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ------------------------------------------------------------------------
# SPDX-FileCopyrightText: Copyright © 2024 bomctl a Series of LF Projects, LLC
# SPDX-FileName: .github/workflows/cflite-pr.yaml
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0
# ------------------------------------------------------------------------
# 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 PR fuzzing
on:
pull_request:
paths:
- "**"
permissions: read-all
jobs:
PR:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
sanitizer:
- address
- undefined
- 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 }}
# Optional but recommended: used to only run fuzzers that are affected
# by the PR.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
- name: Run Fuzzers (${{ matrix.sanitizer }})
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: "code-change"

Check failure on line 59 in .github/workflows/cflite-pr.yml

View workflow job for this annotation

GitHub Actions / yamllint

59:17 [quoted-strings] string value is redundantly quoted with double quotes
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
parallel-fuzzing: true
dry-run: true
# Optional but recommended: used to download the corpus produced by
# batch fuzzing.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
37 changes: 37 additions & 0 deletions .github/workflows/cflite_batch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ClusterFuzzLite batch fuzzing

Check warning on line 1 in .github/workflows/cflite_batch.yml

View workflow job for this annotation

GitHub Actions / yamllint

1:1 [document-start] missing document start "---"
on:
schedule:
- cron: "0 0/6 * * *" # Every 6th hour. Change this to whatever is suitable.

Check failure on line 4 in .github/workflows/cflite_batch.yml

View workflow job for this annotation

GitHub Actions / yamllint

4:13 [quoted-strings] string value is redundantly quoted with double quotes
permissions: read-all
jobs:
BatchFuzzing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer:
- address
# Override this with the sanitizers you want.

Check warning on line 14 in .github/workflows/cflite_batch.yml

View workflow job for this annotation

GitHub Actions / yamllint

14:9 [comments-indentation] comment not indented like content
# - undefined
# - memory
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: go # Change this to the language you are fuzzing.
sanitizer: ${{ matrix.sanitizer }}
- 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"

Check failure on line 30 in .github/workflows/cflite_batch.yml

View workflow job for this annotation

GitHub Actions / yamllint

30:17 [quoted-strings] string value is redundantly quoted with double quotes
sanitizer: ${{ matrix.sanitizer }}
output-sarif: true
# Optional but recommended: For storing certain artifacts from fuzzing.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
49 changes: 49 additions & 0 deletions .github/workflows/cflite_cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ClusterFuzzLite cron tasks

Check warning on line 1 in .github/workflows/cflite_cron.yml

View workflow job for this annotation

GitHub Actions / yamllint

1:1 [document-start] missing document start "---"
on:
schedule:
- cron: "0 0 * * *" # Once a day at midnight.

Check failure on line 4 in .github/workflows/cflite_cron.yml

View workflow job for this annotation

GitHub Actions / yamllint

4:13 [quoted-strings] string value is redundantly quoted with double quotes
permissions: read-all
jobs:
Pruning:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: go # Change this to the language you are fuzzing
- name: Run Fuzzers
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: "prune"

Check failure on line 21 in .github/workflows/cflite_cron.yml

View workflow job for this annotation

GitHub Actions / yamllint

21:17 [quoted-strings] string value is redundantly quoted with double quotes
output-sarif: true
# Optional but recommended.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE- 6DB6 REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
Coverage:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
with:
language: go # Change this to the language you are fuzzing.
sanitizer: coverage
- name: Run Fuzzers
id: run
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fuzz-seconds: 600
mode: "coverage"

Check failure on line 43 in .github/workflows/cflite_cron.yml

View workflow job for this annotation

GitHub Actions / yamllint

43:17 [quoted-strings] string value is redundantly quoted with double quotes
sanitizer: "coverage"

Check failure on line 44 in .github/workflows/cflite_cron.yml

View workflow job for this annotation

GitHub Actions / yamllint

44:22 [quoted-strings] string value is redundantly quoted with double quotes
# Optional but recommended.
# See later section on "Git repo for storage".
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
# storage-repo-branch: main # Optional. Defaults to "main"
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Whitelist patterns anchored to project root
!/.adr-dir
!/.commitlint.yaml
!/.clusterfuzzlite/build.sh
!/.clusterfuzzlite/project.yaml
!/.editorconfig
!/.gitattributes
!/.github/dependabot.yml
Expand Down
Loading
0