Dockerfile from OWASP DockSec, an AI-assisted Dockerfile security tool — a real-world example (notably with curl-pipe-sh, an unpinned latest binary download, and a copied-in entrypoint script).
Source: GitHub
FROM python:3.12-slimRUN apt-get update && apt-get install -y curl git && rm -rf /var/lib/apt/lists/*RUN curl -sL -o /usr/local/bin/hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 && chmod +x /usr/local/bin/hadolintRUN curl -sfL https://raw.githubusercontent.com/aquasec/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/binWORKDIR /github/workspaceCOPY . .RUN pip install --no-cache-dir .COPY entrypoint.sh /entrypoint.shRUN chmod +x /entrypoint.shENTRYPOINT ["/entrypoint.sh"]FROM python:3.12-slimRUN curl -sL -o /usr/local/bin/hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 \
&& chmod +x /usr/local/bin/hadolintRUN curl -sfL https://raw.githubusercontent.com/aquasec/trivy/main/contrib/install.sh \
| sh -s -- -b /usr/local/binContainer userRUN apt-get update \
&& apt-get install -y curl git \
&& rm -rf /var/lib/apt/lists/*COPY . .FROM python:3.12-slimRUN curl -sfL https://raw.githubusercontent.com/aquasec/trivy/main/contrib/install.sh \
| sh -s -- -b /usr/local/binENTRYPOINT ["/entrypoint.sh"]RUN pip install --no-cache-dir .RUN apt-get update \
&& apt-get install -y curl git \
&& rm -rf /var/lib/apt/lists/*RUN apt-get update \
&& apt-get install -y curl git \
&& rm -rf /var/lib/apt/lists/*No HEALTHCHECK defined