# Base image pinned by digest (multi-arch manifest list), verified against
# registry-1.docker.io 2026-11-18. A tag alone can be re-pointed; the digest
# cannot. To update the base image, fetch the new digest from Docker Hub
# and update this line (and the SBOM note in build-zip.py).
FROM python:3.12.16-slim@sha256:5e2bdb1b0d542d5039cffb8181c65930093949194a65c365dfb1b0fe13a4fa5b
# Debian's zlib security update postdates the pinned official base.
RUN apt-get update -o APT::Update::Error-Mode=any \
 && apt-get install -y --no-install-recommends --only-upgrade 'zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1' \
 && rm -rf /var/lib/apt/lists/*
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /scanner
RUN groupadd --gid 10001 scanner && useradd --uid 10001 --gid 10001 --no-create-home scanner
COPY --chown=10001:10001 app ./app
USER 10001:10001
ENTRYPOINT ["python", "-m", "app"]
