diff --git a/Dockerfile.fuzz b/Dockerfile.fuzz index 8376fbeb74..4f317aa78c 100644 --- a/Dockerfile.fuzz +++ b/Dockerfile.fuzz @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine as builder RUN apk add --no-cache python3 py3-pip bash coreutils -RUN wget https://github.com/microsoft/restler-fuzzer/archive/refs/tags/v9.2.2.tar.gz +RUN wget -q "https://github.com/microsoft/restler-fuzzer/archive/refs/tags/v9.2.2.tar.gz" RUN tar -xvf v9.2.2.tar.gz && mv restler-fuzzer-9.2.2 restler-fuzzer RUN cd restler-fuzzer; mkdir -p restler_bin diff --git a/Makefile b/Makefile index fbb14d6dcd..1d85c4ffeb 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 # -.PHONY: build clean unittest hadolint lint test docker run sbom +.PHONY: build clean unittest hadolint lint test docker run sbom build-fuzz-test run-fuzz-test # change the following boolean flag to include or exclude the delayed start libs for builds for most of core services except support services INCLUDE_DELAYED_START_BUILD_CORE:="false" @@ -367,3 +367,9 @@ sbom: docker run -it --rm \ -v "$$PWD:/edgex-go" -v "$$PWD/sbom:/sbom" \ spdx/spdx-sbom-generator -p /edgex-go/ -o /sbom/ --include-license-text true + +build-fuzz-test: + docker build -f Dockerfile.fuzz -t fuzz-edgex-go:latest . + +run-fuzz-test: + docker run --net host -v $(pwd)/fuzz_results:/fuzz_results fuzz-edgex-go:latest