@@ -10,6 +10,8 @@ ENV OS=Linux
1010ENV ARCH=x86_64
1111
1212
13+ ENV SEMGREP_VERSION=v8.24.2
14+
1315
1416RUN curl -sL "https://github.com/google/go-containerregistry/releases/download/${CRANE_VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" > go-containerregistry.tar.gz && \
1517 tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane
@@ -19,16 +21,20 @@ RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/
1921
2022RUN curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64" && mv cosign-linux-amd64 /usr/local/bin/cosign && chmod +x /usr/local/bin/cosign
2123
22- RUN curl -sL "https://github.com/semgrep/semgrep/archive/refs/tags/v1.117.0.tar.gz" > semgrep .tar.gz && \
23- tar -zxvf semgrep. tar.gz -C /usr/local/bin/ semgrep
24+ RUN curl -O -L "https://github.com/gitleaks/gitleaks/releases/download/v8.24.2/gitleaks_8.24.2_linux_arm64 .tar.gz" && \
25+ tar -zxvf gitleaks_8.24.2_linux_arm64. tar.gz -C /usr/local/bin/ gitleaks
2426
27+
28+ RUN curl -sL "https://github.com/semgrep/semgrep/archive/refs/tags/v1.117.0.tar.gz" > semgrep.tar.gz && \
29+ tar -zxvf semgrep.tar.gz && \
30+ mv semgrep-1.117.0 /usr/local/bin/semgrep
2531COPY . .
2632
2733# build the scanner
2834RUN CGO_ENABLED=0 make devguard-scanner
2935# ----------------------
3036# create final image with node:alpine
31- FROM zricethezav/gitleaks:v8.24 .2@sha256:b5918eb91b8d2473cec722f066abb4352e4ffdc4ec9f4283ec143aba9ec9ebc4
37+ FROM alpine:3.20 .2@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
3238
3339RUN apk add --no-cache git
3440
@@ -37,5 +43,6 @@ COPY --from=golang-builder /usr/local/bin/trivy /usr/local/bin/trivy
3743COPY --from=golang-builder /usr/local/bin/cosign /usr/local/bin/cosign
3844COPY --from=golang-builder /usr/local/bin/crane /usr/local/bin/crane
3945COPY --from=golang-builder /usr/local/bin/semgrep /usr/local/bin/semgrep
46+ COPY --from=golang-builder /usr/local/bin/gitleaks /usr/local/bin/gitleaks
4047
4148ENTRYPOINT [""]
0 commit comments