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:
+9
-9
@@ -122,7 +122,7 @@ x-hardening-exceptions: {}
|
||||
services:
|
||||
postgres:
|
||||
<<: *hardening
|
||||
image: postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722
|
||||
image: postgres:18.6-trixie@sha256:e3d24f6906d0760bf4da0dae872415391ededefad23fd471c47dc53b0ddf3c42
|
||||
restart: unless-stopped
|
||||
# сразу от пользователя postgres образа (change container-hardening,
|
||||
# design, решение 3): entrypoint не от root пропускает смену владельца и
|
||||
@@ -216,7 +216,7 @@ services:
|
||||
# после рестарта кэш пуст, данные остаются в PostgreSQL
|
||||
valkey:
|
||||
<<: *hardening
|
||||
image: valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd
|
||||
image: valkey/valkey:9.1.4-trixie@sha256:3ab0eca823ebbf0fe352476ebac330ac9e5f14b592b9a954eab296d341e81b0e
|
||||
restart: unless-stopped
|
||||
# ACL (change storage-roles, design, решение 9): infra/valkey/start.sh
|
||||
# пишет файл пользователей с SHA-256 паролей на tmpfs /run/valkey и exec
|
||||
@@ -419,7 +419,7 @@ services:
|
||||
# только TLS-порт на loopback, для запуска в консоли
|
||||
rabbitmq:
|
||||
<<: *hardening
|
||||
image: rabbitmq:4.3.7@sha256:bd88985187aa73cd598fa0d8b31d49b2f814a6d9e58f6d5a89bae588669d946a
|
||||
image: rabbitmq:4.3.7@sha256:6c988780c85e08b7f12395973b89bda8fb3fe2f656498a74b1479a37f9903e48
|
||||
hostname: rabbitmq
|
||||
restart: unless-stopped
|
||||
# infra/rabbitmq/start.sh: проверки окружения и материалов TLS, копии в
|
||||
@@ -1026,7 +1026,7 @@ services:
|
||||
# свои файлы PKI
|
||||
haproxy:
|
||||
<<: *hardening
|
||||
image: haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26
|
||||
image: haproxy:3.4.7-trixie@sha256:f6d2ee87b47192d9cc8c22e88fef405122ff339859644883edc2a7d1827f87b3
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
default:
|
||||
@@ -1112,7 +1112,7 @@ services:
|
||||
# без проверки Collector. Портов наружу нет
|
||||
otel-gateway:
|
||||
<<: *hardening
|
||||
image: haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26
|
||||
image: haproxy:3.4.7-trixie@sha256:f6d2ee87b47192d9cc8c22e88fef405122ff339859644883edc2a7d1827f87b3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# конфигурация OpenSSL процесса LB: без билетов сессии TLS 1.3 (нет
|
||||
@@ -1222,7 +1222,7 @@ services:
|
||||
# оставляют хранилище без сети — runbook TelemetryTargetDown
|
||||
loki-gateway:
|
||||
<<: *hardening
|
||||
image: haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26
|
||||
image: haproxy:3.4.7-trixie@sha256:f6d2ee87b47192d9cc8c22e88fef405122ff339859644883edc2a7d1827f87b3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OPENSSL_CONF: /usr/local/etc/haproxy/openssl.cnf
|
||||
@@ -1265,7 +1265,7 @@ services:
|
||||
|
||||
tempo-gateway:
|
||||
<<: *hardening
|
||||
image: haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26
|
||||
image: haproxy:3.4.7-trixie@sha256:f6d2ee87b47192d9cc8c22e88fef405122ff339859644883edc2a7d1827f87b3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OPENSSL_CONF: /usr/local/etc/haproxy/openssl.cnf
|
||||
@@ -1306,7 +1306,7 @@ services:
|
||||
|
||||
prometheus-gateway:
|
||||
<<: *hardening
|
||||
image: haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26
|
||||
image: haproxy:3.4.7-trixie@sha256:f6d2ee87b47192d9cc8c22e88fef405122ff339859644883edc2a7d1827f87b3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
OPENSSL_CONF: /usr/local/etc/haproxy/openssl.cnf
|
||||
@@ -1412,7 +1412,7 @@ services:
|
||||
# в Prometheus и проверка источника в Grafana
|
||||
loki:
|
||||
<<: *hardening
|
||||
image: grafana/loki:3.7.9@sha256:0db216b630ae1f348a1584c67f3cead8b4c1fc839169a39501db664744158e28
|
||||
image: grafana/loki:3.7.10@sha256:b43c257ccfc925d4a50b8717cac61a3b51df8c48d01847936057e5c4075a24a7
|
||||
restart: unless-stopped
|
||||
command: ["-config.file=/etc/loki/loki.yaml"]
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user