2026-07-07 09:57:21 +02:00
|
|
|
FROM semgrep/semgrep:latest
|
|
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
|
|
RUN sed -i 's/https/http/g' /etc/apk/repositories && \
|
2026-07-15 14:00:59 +02:00
|
|
|
apk update && apk add --no-cache python3 py3-pip git
|
2026-07-07 09:57:21 +02:00
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir \
|
|
|
|
|
--trusted-host pypi.org \
|
|
|
|
|
--trusted-host files.pythonhosted.org \
|
|
|
|
|
--break-system-packages \
|
|
|
|
|
fastapi uvicorn
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-07-15 14:00:59 +02:00
|
|
|
# COPY r2c-security-audit.yaml /app/r2c-security-audit.yaml
|
|
|
|
|
COPY rules/ /app/rules/
|
|
|
|
|
RUN sed -i 's/adjust_for_docker()/pass/g' /usr/lib/python3.12/site-packages/semgrep/commands/scan.py
|
|
|
|
|
|
2026-07-07 09:57:21 +02:00
|
|
|
COPY main.py .
|
|
|
|
|
|
|
|
|
|
EXPOSE 8004
|
|
|
|
|
|
|
|
|
|
CMD ["python3", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8004"]
|