File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,26 +3,39 @@ FROM golang:1.24.0 AS golang-builder
33# set the working directory
44WORKDIR /app
55
6- # like linux/amd64
76ARG TARGETPLATFORM
87
9- COPY install_devguard_scanner_deps.sh .
8+ ENV CRANE_VERSION=v0.19.1
9+ ENV OS=Linux
10+ ENV ARCH=x86_64
1011
11- RUN ./install_devguard_scanner_deps.sh ${TARGETPLATFORM}
12+
13+
14+ RUN curl -sL "https://github.com/google/go-containerregistry/releases/download/${CRANE_VERSION}/go-containerregistry_${OS}_${ARCH}.tar.gz" > go-containerregistry.tar.gz && \
15+ tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane
16+
17+ RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.58.1
18+
19+
20+ RUN 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
21+
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
1224
1325COPY . .
1426
1527# build the scanner
1628RUN CGO_ENABLED=0 make devguard-scanner
1729# ----------------------
1830# create final image with node:alpine
19- FROM alpine:3.20 .2@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
31+ FROM zricethezav/gitleaks:v8.24 .2@sha256:b5918eb91b8d2473cec722f066abb4352e4ffdc4ec9f4283ec143aba9ec9ebc4
2032
2133RUN apk add --no-cache git
2234
2335COPY --from=golang-builder /app/devguard-scanner /usr/local/bin/devguard-scanner
2436COPY --from=golang-builder /usr/local/bin/trivy /usr/local/bin/trivy
2537COPY --from=golang-builder /usr/local/bin/cosign /usr/local/bin/cosign
2638COPY --from=golang-builder /usr/local/bin/crane /usr/local/bin/crane
39+ COPY --from=golang-builder /usr/local/bin/semgrep /usr/local/bin/semgrep
2740
2841ENTRYPOINT [""]
You can’t perform that action at this time.
0 commit comments