Skip to content
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

Add new tools: Clair, Snyk, Grype #15

Merged
merged 13 commits into from
Oct 4, 2024
2 changes: 2 additions & 0 deletions .github/workflows/test-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ on:
push:
branches:
- main
- develop
paths:
- Dockerfile
pull_request:
branches:
- main
- develop
paths:
- Dockerfile

Expand Down
28 changes: 22 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,29 @@ RUN wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --
RUN wget -qO - https://github.com/trufflesecurity/trufflehog/releases/download/v3.82.6/trufflehog_3.82.6_linux_$(dpkg --print-architecture).tar.gz | \
sudo tar -xzf - trufflehog -C /usr/local/bin


# Install 2ms
RUN mkdir 2ms \
&& cd 2ms \
&& wget https://github.com/checkmarx/2ms/releases/latest/download/linux-amd64.zip \
&& unzip linux-amd64.zip \
&& sudo ln -s /src/2ms/2ms /usr/local/bin/2ms
RUN wget -qO - https://github.com/checkmarx/2ms/releases/latest/download/linux-amd64.zip | \
funzip - | sudo tee /usr/local/bin/2ms > /dev/null \
&& sudo chmod +x /usr/local/bin/2ms

# Install clair
RUN sudo wget -qO /usr/local/bin/clair https://github.com/quay/clair/releases/download/v4.7.4/clairctl-linux-$(dpkg --print-architecture) \
&& sudo chmod +x /usr/local/bin/clair

# Install snyk
RUN ARCH=$(dpkg --print-architecture) \
reynico marked this conversation as resolved.
Show resolved Hide resolved
&& if [ "$ARCH" = "amd64" ]; then \
sudo wget -qO /usr/local/bin/snyk https://github.com/snyk/cli/releases/download/v1.1293.1/snyk-linux; \
elif [ "$ARCH" = "arm64" ]; then \
sudo wget -qO /usr/local/bin/snyk https://github.com/snyk/cli/releases/download/v1.1293.1/snyk-linux-arm64; \
fi \
&& sudo chmod +x /usr/local/bin/snyk

# Install Grype
RUN ARCH=$(dpkg --print-architecture) \
reynico marked this conversation as resolved.
Show resolved Hide resolved
&& wget -q https://github.com/anchore/grype/releases/download/v0.81.0/grype_0.81.0_linux_$ARCH.deb \
reynico marked this conversation as resolved.
Show resolved Hide resolved
&& sudo dpkg -i grype_0.81.0_linux_$ARCH.deb \
reynico marked this conversation as resolved.
Show resolved Hide resolved
&& rm grype_0.81.0_linux_$ARCH.deb
reynico marked this conversation as resolved.
Show resolved Hide resolved

# Clean up
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
Expand Down