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:
2026-11-27 12:48:07 +03:00
co-authored by Claude Opus 5.5
parent 1ea196c38f
commit b6eed88e95
21 changed files with 3007 additions and 70 deletions
+10
View File
@@ -242,6 +242,16 @@ IP). После закрытия всех changes план удаляется,
- Evidence — версии инструментов, дата и версия базы уязвимостей, число находок по
образам и severity, таблица разбора; после обновлений — `make hardening_check` и
проверки затронутых сервисов.
- Итог apply (2026-11-27, рабочее дерево поверх `1ea196c`): `make scan [REPORT=1]` —
Trivy 0.76.2 по digest (база v2 от 2026-11-27) и pip-audit 2.10.1 в группе
разработки; правило — CRITICAL / HIGH образов с любым статусом, секреты образа
приложения, любая находка `uv.lock`; разбор — `infra/scan/triage.toml`, 26 записей
(22 `not_affected`, 2 `mitigated`, 2 `accepted`: libxml2 PostgreSQL и HTTP/2 шлюза
S3 до 2026-12-27). Обновлены в патч-линии: PostgreSQL и RabbitMQ (пересборки),
Valkey 9.1.4, HAProxy 3.4.7, Python 3.12.15-slim, Loki 3.7.10, пять пакетов
Python; обязательных строк 418 → 360 (все разобраны), `uv.lock` 35 → 0, `make scan`
— код 0. CI — нет (design, решение 12). Evidence —
`evidence/security/vulnerability-scan.md`.
### 7. `rotation-revocation`