-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: AdamKorcz <[email protected]>
- Loading branch information
1 parent
78267c9
commit 3dd705d
Showing
6 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM gcr.io/oss-fuzz-base/base-builder-go | ||
COPY . $SRC/spicedb | ||
WORKDIR $SRC/spicedb | ||
COPY ./.clusterfuzzlite/build.sh $SRC/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -eu | ||
|
||
go install github.com/AdamKorcz/go-118-fuzz-build@latest | ||
go get github.com/AdamKorcz/go-118-fuzz-build/utils | ||
|
||
# Workaround https://github.com/AdamKorcz/go-118-fuzz-build/issues/2 | ||
mv $SRC/spicedb/pkg/schemadsl/parser/parser_test.go $SRC/spicedb/pkg/schemadsl/parser/parser_test_fuzz.go | ||
|
||
compile_native_go_fuzzer github.com/authzed/spicedb/pkg/schemadsl/parser FuzzParser FuzzParser | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
language: "go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,34 @@ | ||
name: "Fuzzing Testing" | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- "!dependabot/*" | ||
- "main" | ||
--- | ||
name: "ClusterFuzzLite PR fuzzing" | ||
on: | ||
pull_request: | ||
branches: ["*"] | ||
paths: | ||
- '**' | ||
permissions: "read-all" | ||
jobs: | ||
fuzz: | ||
runs-on: "ubuntu-latest" | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ matrix.sanitizer }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sanitizer: | ||
- "address" | ||
steps: | ||
- name: "Build Fuzzers" | ||
- name: "Build Fuzzers (${{ matrix.sanitizer }})" | ||
id: "build" | ||
uses: "google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master" | ||
uses: "google/clusterfuzzlite/actions/build_fuzzers@v1" | ||
with: | ||
oss-fuzz-project-name: "spicedb" | ||
language: "go" | ||
dry-run: "true" | ||
- name: "Run Fuzzers" | ||
uses: "google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
sanitizer: "${{ matrix.sanitizer }}" | ||
- name: "Run Fuzzers (${{ matrix.sanitizer }})" | ||
id: "run" | ||
uses: "google/clusterfuzzlite/actions/run_fuzzers@v1" | ||
with: | ||
oss-fuzz-project-name: "spicedb" | ||
language: "go" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
fuzz-seconds: 300 | ||
dry-run: "true" | ||
- name: "Upload Crash" | ||
uses: "actions/upload-artifact@v3" | ||
if: failure() && steps.build.outcome == 'success' | ||
with: | ||
name: "artifacts" | ||
path: "./out/artifacts" | ||
|
||
go-test-fuzz: | ||
name : "go test -fuzz" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "jidicula/[email protected]" | ||
with: | ||
fuzz-time: 30s | ||
mode: "code-change" | ||
sanitizer: "${{ matrix.sanitizer }}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters