mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
build: pin the scanner image tool versions
The scanner image installed trivy and grype from install scripts on the main branch, govulncheck at latest and pip-audit unpinned, so every build could pull different tools. They are now pinned: trivy v0.76.2, grype v0.121.2, govulncheck v1.9.0 and pip-audit 2.10.1, each released at least two weeks ago.
This commit is contained in:
+4
-4
@@ -23,17 +23,17 @@ RUN apk add --no-cache \
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
|
|
||||||
# Install Trivy for container scanning
|
# Install Trivy for container scanning
|
||||||
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/v0.76.2/contrib/install.sh | sh -s -- -b /usr/local/bin v0.76.2
|
||||||
|
|
||||||
# Install Grype for vulnerability scanning
|
# Install Grype for vulnerability scanning
|
||||||
RUN curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
|
RUN curl -sSfL https://raw.githubusercontent.com/anchore/grype/v0.121.2/install.sh | sh -s -- -b /usr/local/bin v0.121.2
|
||||||
|
|
||||||
# Install govulncheck for Go vulnerability scanning
|
# Install govulncheck for Go vulnerability scanning
|
||||||
RUN go install golang.org/x/vuln/cmd/govulncheck@latest && \
|
RUN go install golang.org/x/vuln/cmd/govulncheck@v1.9.0 && \
|
||||||
mv /root/go/bin/govulncheck /usr/local/bin/
|
mv /root/go/bin/govulncheck /usr/local/bin/
|
||||||
|
|
||||||
# Install pip-audit for Python package vulnerability scanning
|
# Install pip-audit for Python package vulnerability scanning
|
||||||
RUN pip3 install --no-cache-dir pip-audit --break-system-packages
|
RUN pip3 install --no-cache-dir pip-audit==2.10.1 --break-system-packages
|
||||||
|
|
||||||
# Create non-root user
|
# Create non-root user
|
||||||
RUN addgroup -g 1000 scanner && \
|
RUN addgroup -g 1000 scanner && \
|
||||||
|
|||||||
Reference in New Issue
Block a user