Skip to content

Commit

Permalink
add .clusterfuzzlite
Browse files Browse the repository at this point in the history
Signed-off-by: bytemare <3641580+bytemare@users.noreply.github.com>
  • Loading branch information
bytemare committed Nov 14, 2023
1 parent 433ab7b commit 8a4ad51
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
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
RUN git clone --depth 1 https://github.com/bytemare/opaque.git
COPY . $SRC/opaque
WORKDIR $SRC/opaque
COPY ./.clusterfuzzlite/build.sh $SRC/
9 changes: 9 additions & 0 deletions .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -eu

compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzConfiguration fuzz_Configuration fuzz
compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzDeserializeRegistrationRequest fuzz_DeserializeRegistrationRequest fuzz
compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzDeserializeRegistrationResponse fuzz_DeserializeRegistrationResponse fuzz
compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzDeserializeRegistrationRecord fuzz_DeserializeRegistrationRecord fuzz
compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzDeserializeKE1 fuzz_DeserializeKE1 fuzz
compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzDeserializeKE2 fuzz_DeserializeKE2 fuzz
compile_native_go_fuzzer github.com/bytemare/opaque/test FuzzDeserializeKE3 fuzz_DeserializeKE3 fuzz
10 changes: 10 additions & 0 deletions .clusterfuzzlite/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
homepage: "https://github.com/bytemare/opaque"
language: go
sanitizers:
- address
- undefined
- memory
architectures:
- x86_64
- i386
main_repo: 'https://github.com/bytemare/opaque.git'
2 changes: 1 addition & 1 deletion tests/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func fuzzTestConfigurationError(t *testing.T, c *opaque.Configuration, err error
t.Skip()
}
if strings.Contains(err.Error(), errInvalidAKEid.Error()) {
if c.AKE.Group().Available() {
if c.AKE.Available() {
t.Fatalf("got %q but input is valid: %q", errInvalidAKEid, c.AKE)
}
t.Skip()
Expand Down

0 comments on commit 8a4ad51

Please sign in to comment.