Skip to content

Commit

Permalink
New - Included CIFuzz
Browse files Browse the repository at this point in the history
- included cifuzz
- removed the make fuzz func which was running fuzz tests.

Signed-off-by: naveensrinivasan <[email protected]>
  • Loading branch information
naveensrinivasan committed Jan 10, 2023
1 parent 9c89f80 commit d7c4420
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@79f4ed33d9ece2694593e0c7d8af63c936fa3dea
with:
oss-fuzz-project-name: 'rekor'
dry-run: false
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@95d5e613e7a88ed6746bdefaff1f1649b463873a
with:
oss-fuzz-project-name: 'rekor'
fuzz-seconds: 300
dry-run: false
language: go
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:

- name: Build
run: make -C $GITHUB_WORKSPACE all
- name: Fuzz-Build
run: make -C $GITHUB_WORKSPACE fuzz
- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload Coverage Report
Expand Down
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,6 @@ ko-trillian:
&& mv trillianServerImagerefs ../.. \
&& cd -

.PHONY: fuzz
# This runs the fuzz tests for a short period of time to ensure they don't crash.
fuzz:
go test -fuzz FuzzCreateEntryIDFromParts -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzGetUUIDFromIDString -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzGetTreeIDFromIDString -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzPadToTreeIDLen -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzReturnEntryIDString -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzTreeID -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzValidateUUID -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzValidateTreeID -fuzztime $(FUZZ_DURATION) ./pkg/sharding
go test -fuzz FuzzValidateEntryID -fuzztime $(FUZZ_DURATION) ./pkg/sharding

## --------------------------------------
## Tooling Binaries
## --------------------------------------
Expand Down

0 comments on commit d7c4420

Please sign in to comment.