-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
502 additions
and
0 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,29 @@ | ||
FROM golang:1.16-buster as builder | ||
|
||
RUN apt-get update && apt-get install -y git vim clang | ||
RUN git clone https://github.com/fluxcd/kustomize-controller /kustomize-controller | ||
|
||
WORKDIR /kustomize-controller | ||
|
||
# fillippo.io/age v1.0.0-beta7 throws an error | ||
RUN sed 's/filippo.io\/age v1.0.0-beta7/filippo.io\/age v1.0.0/g' -i /kustomize-controller/go.mod | ||
RUN make download-crd-deps | ||
RUN mkdir /kustomize-controller/fuzz | ||
COPY fuzz.go /kustomize-controller/controllers/ | ||
|
||
RUN go mod tidy | ||
|
||
RUN cd / \ | ||
&& go get -u github.com/dvyukov/go-fuzz/go-fuzz@latest github.com/dvyukov/go-fuzz/go-fuzz-build@latest | ||
RUN go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest | ||
RUN go get github.com/AdaLogics/go-fuzz-headers | ||
RUN go mod download golang.org/x/sync | ||
RUN go mod download github.com/dvyukov/go-fuzz | ||
|
||
RUN mkdir /fuzzers | ||
RUN cd /kustomize-controller/controllers \ | ||
&& go-fuzz-build -libfuzzer -func=Fuzz \ | ||
&& clang -o /fuzzers/Fuzz reflect-fuzz.a \ | ||
-fsanitize=fuzzer | ||
|
||
RUN cd /kustomize-controller/controllers && /fuzzers/Fuzz |
Oops, something went wrong.