-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add dockerfile and script to perform fuzzing test on all swagger files and individual #4569
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
68fae54
to
807f438
Compare
Dockerfile.fuzz
Outdated
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sonarqube is flagging this line:
@vli11 , please add make targets for building and running .
|
Dockerfile.fuzz
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combine these two runs and delete gz file after mv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it is more efficient to just pipe the wget output into tar directly, and use tar options to manipulate the target directory
WORKDIR /restler-fuzzer
RUN wget -q -O - (url.tar.gz) | tar xz --strip-components 1 && mkdir restler_bin`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's great
Dockerfile.fuzz
Outdated
RUN cd restler-fuzzer; mkdir -p restler_bin | ||
WORKDIR /restler-fuzzer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUN cd restler-fuzzer; mkdir -p restler_bin | |
WORKDIR /restler-fuzzer |
Combined into previous statement
Dockerfile.fuzz
Outdated
RUN wget -q "https://github.com/microsoft/restler-fuzzer/archive/refs/tags/v9.2.2.tar.gz" && \ | ||
tar -xvf v9.2.2.tar.gz && \ | ||
mv restler-fuzzer-9.2.2 restler-fuzzer && \ | ||
rm v9.2.2.tar.gz && \ | ||
cd restler-fuzzer && \ | ||
mkdir -p restler_bin | ||
|
||
WORKDIR /restler-fuzzer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUN wget -q "https://github.com/microsoft/restler-fuzzer/archive/refs/tags/v9.2.2.tar.gz" && \ | |
tar -xvf v9.2.2.tar.gz && \ | |
mv restler-fuzzer-9.2.2 restler-fuzzer && \ | |
rm v9.2.2.tar.gz && \ | |
cd restler-fuzzer && \ | |
mkdir -p restler_bin | |
WORKDIR /restler-fuzzer | |
WORKDIR /restler-fuzzer | |
RUN wget -q -O - "https://github.com/microsoft/restler-fuzzer/archive/refs/tags/v9.2.2.tar.gz" | \ | |
tar xvf - --strip-components 1 && \ | |
mkdir -p restler_bin |
@vli11 You will have to squash and rebase this PR due to the Semantic PR check failing. |
feat: add dockerfile and script to perform fuzzing test on all swagger files and individual Closes: edgexfoundry#4568 Signed-off-by: Valina Li <[email protected]>
a0e06c8
to
00c7f83
Compare
Signed-off-by: Valina Li <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except make test
failed
@vli11 , Hado lint failing on your new docker file. |
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine hadolint error: DL3026 error: Use only an allowed registry in the FROM image; but docker hub does have this official image https://hub.docker.com/_/microsoft-dotnet-sdk/https://hub.docker.com/_/microsoft-dotnet-sdk/. any suggestions? @lenny-intel @bnevis-i |
I would ignore the error in .hadolint.yaml. https://github.com/edgexfoundry/edgex-go/blob/main/.hadolint.yml |
Signed-off-by: Valina Li <[email protected]>
i wonder what is the reason that Microsoft doesn't publish the latest version to Docker hub. maybe the one in docker hub is stable version |
Signed-off-by: Valina Li <[email protected]>
Because Microsoft has the better registry? (Probably true, it supports the latest OCI registry standards.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Third time lucky?
Signed-off-by: Valina Li <[email protected]>
Signed-off-by: Valina Li <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
to build:
docker build -f Dockerfile.fuzz -t fuzz-edgex-go:latest .
to run:
docker run --net host -v $(pwd)/fuzz_results:/fuzz_results fuzz-edgex-go:latest
New Dependency Instructions (If applicable)