forked from mtusi2026/mtusi2026lab7
feat: scan images and uv.lock for vulnerabilities with a triage file and patch-line updates
make scan runs pinned Trivy (by digest, no Docker socket, images as docker save archives, network none, read-only) over every compose image and the app image (also secrets in layers) and pinned pip-audit over the uv.lock groups; every CRITICAL/HIGH image finding, secret and pip-audit finding needs a triage record (verdict, reason, control, review date) in infra/scan/triage.toml, otherwise a non-zero exit. Fixable findings are updated within the patch line after a 7-day quarantine: PostgreSQL and RabbitMQ rebuilds, Valkey 9.1.4, HAProxy 3.4.7, Loki 3.7.10, Python 3.12.15, certifi, dnspython, black, filelock, virtualenv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@
|
||||
# тег и digest из `docker buildx imagetools inspect <тег>`.
|
||||
|
||||
# builder: зависимости строго по uv.lock в /app/.venv
|
||||
FROM python:3.12.14-slim-trixie@sha256:f77ac9e44ae96ef2c90b8053ea08c31f8be030f824196b0ae4db6d462c84e51f AS builder
|
||||
FROM python:3.12.15-slim-trixie@sha256:a0f57064cbdcd6285fa45f51237ab0b35ea8ebaed06a1f5973e89e19dfb86704 AS builder
|
||||
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.12.17@sha256:10787c682e4184e4f290de1171fd4703dc63de99221f10fe1c99002ce7fa9acc /uv /bin/uv
|
||||
|
||||
@@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
|
||||
|
||||
# runtime: интерпретатор базового образа, .venv и src/, без uv
|
||||
FROM python:3.12.14-slim-trixie@sha256:f77ac9e44ae96ef2c90b8053ea08c31f8be030f824196b0ae4db6d462c84e51f AS runtime
|
||||
FROM python:3.12.15-slim-trixie@sha256:a0f57064cbdcd6285fa45f51237ab0b35ea8ebaed06a1f5973e89e19dfb86704 AS runtime
|
||||
|
||||
RUN groupadd --system --gid 10001 app \
|
||||
&& useradd --system --uid 10001 --gid app --no-create-home \
|
||||
|
||||
Reference in New Issue
Block a user