File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,9 +55,33 @@ RUN CGO_ENABLED=0 make devguard-scanner
5555FROM alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
5656
5757RUN apk add --no-cache git python3
58- RUN python3 -m venv /usr/local/bin/venv && \
59- /usr/local/bin/venv/bin/pip install --upgrade pip && \
60- /usr/local/bin/venv/bin/pip install semgrep checkov
58+ # Create virtualenvs
59+ ENV VENV_DIR=/opt/tools
60+ RUN python -m venv ${VENV_DIR}/semgrep && \
61+ python -m venv ${VENV_DIR}/checkov
62+
63+ # Install semgrep in its venv
64+ RUN ${VENV_DIR}/semgrep/bin/pip install --upgrade pip && \
65+ ${VENV_DIR}/semgrep/bin/pip install semgrep==1.131.0
66+
67+ # Install checkov in its venv
68+ RUN ${VENV_DIR}/checkov/bin/pip install --upgrade pip && \
69+ ${VENV_DIR}/checkov/bin/pip install checkov==3.2.457
70+
71+
72+ RUN cat <<EOF > /usr/local/bin/semgrep
73+ #!/bin/sh
74+ exec ${VENV_DIR}/semgrep/bin/semgrep "\$@"
75+ EOF
76+
77+ RUN chmod +x /usr/local/bin/semgrep
78+
79+ RUN cat <<EOF > /usr/local/bin/checkov
80+ #!/bin/sh
81+ exec ${VENV_DIR}/checkov/bin/checkov "\$@"
82+ EOF
83+
84+ RUN chmod +x /usr/local/bin/checkov
6185
6286# add venv bin to path
6387ENV PATH="/usr/local/bin/venv/bin:$PATH"
You can’t perform that action at this time.
0 commit comments