fix(ci): resolve security findings and improve Trivy reporting
This commit is contained in:
1 parent
138666a7bb
commit
e9f56a6aa2
9 files changed
+110
-12
No files matched your search
@@ -45,6 +45,8 @@ down stops containers and keeps named volumes. Do not delete database or file vo
|
||||
|
||||
ML uses a separate Compose file and project; it does not require or start Redis or SeaweedFS in the current scaffold. Its default host bind is 127.0.0.1:8000. Set ML_BIND_ADDRESS only after choosing a private address and preparing firewall rules. Prometheus does not scrape remote ML while ML_METRICS_TARGET is empty.
|
||||
|
||||
The ML image uses `python:alpine` and upgrades system packages during the build. Dependencies are installed with uv only in the build stage; the final runtime contains the prepared virtual environment without pip or ensurepip. Current dependencies support musl. Check Alpine compatibility before adding inference or GPU libraries; glibc-dependent libraries will require a different validated runtime.
|
||||
|
||||
make -C deploy ml-config
|
||||
make -C deploy ml-up
|
||||
make -C deploy ml-logs
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ Image checks require Docker. The backend build context is `backend/`; frontend a
|
||||
|
||||
Trivy findings of severity `HIGH` or `CRITICAL` fail the check, including findings without a published fix, unless an active, narrowly scoped exception applies. Gitleaks findings, configured Semgrep findings, govulncheck findings, and scanner errors also fail their targets. The existing Go lint configuration retains gosec; this complements the added checks.
|
||||
|
||||
Review the reported package, installed version, affected path, and available remediation before changing dependencies or configuration. Keep reports local: `security/reports/` is ignored. govulncheck uses text output so its native failure status is preserved.
|
||||
Review the reported package, installed version, affected path, and available remediation before changing dependencies or configuration. Keep reports local: `security/reports/` is ignored. govulncheck uses text output so its native failure status is preserved. Trivy saves JSON reports and prints their tables in the check log. A scan error, missing report, or report conversion error keeps the check failing.
|
||||
|
||||
One temporary exception in [security/trivy/ignore.yml](../../security/trivy/ignore.yml) was approved by the project owner on 2026-10-05: `CVE-2026-93687` for `pkg:npm/braces@3.0.3` in `frontend/pnpm-lock.yaml`. At approval, no fixed release was available; the exception unblocks dependency CI until its expiry on 2026-10-19. Project maintainers own the exception and must remove it when a fix becomes available or review it before expiry. Trivy enforces the expiry date. Only filesystem scanning uses this exception file; suppressed findings remain visible in its JSON report. Image scanning is unaffected.
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ down останавливает контейнеры, сохраняя имен
|
||||
|
||||
ML имеет отдельный Compose-файл и проект; Redis и SeaweedFS ему пока не требуются и здесь не запускаются. По умолчанию он слушает на 127.0.0.1:8000. Настройте ML_BIND_ADDRESS только если выбранный приватный адрес и firewall уже подготовлены. Метрики удаленного ML target не собираются, пока ML_METRICS_TARGET пуст.
|
||||
|
||||
Образ ML использует `python:alpine` с обновлением системных пакетов при сборке. Зависимости устанавливаются через uv только на этапе сборки; итоговый runtime содержит готовое виртуальное окружение без pip и ensurepip. Текущие зависимости поддерживают musl. Перед добавлением библиотек inference или GPU проверьте их совместимость с Alpine; glibc-зависимым библиотекам потребуется другой проверенный runtime.
|
||||
|
||||
make -C deploy ml-config
|
||||
make -C deploy ml-up
|
||||
make -C deploy ml-logs
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ Gitleaks требует полный Git checkout. Отсутствие репо
|
||||
|
||||
Находки Trivy с уровнем `HIGH` или `CRITICAL` завершают проверку ошибкой, включая уязвимости без опубликованного исправления, если для находки нет действующего адресного исключения. Находки Gitleaks, настроенных правил Semgrep, govulncheck и ошибки самих сканеров также завершают соответствующие цели ошибкой. В конфигурации Go-линтера остается gosec; новые проверки дополняют его.
|
||||
|
||||
Перед изменением зависимостей или конфигурации проверьте указанный пакет, установленную версию, затронутый путь и доступное исправление. Отчеты хранятся локально: `security/reports/` исключен из Git. govulncheck использует текстовый вывод, чтобы сохранить собственный код завершения при находках.
|
||||
Перед изменением зависимостей или конфигурации проверьте указанный пакет, установленную версию, затронутый путь и доступное исправление. Отчеты хранятся локально: `security/reports/` исключен из Git. govulncheck использует текстовый вывод, чтобы сохранить собственный код завершения при находках. Trivy сохраняет JSON-отчеты и печатает их таблицы в лог проверки. Ошибка сканирования, отсутствие отчета или ошибка его преобразования сохраняют блокирующий результат.
|
||||
|
||||
В [security/trivy/ignore.yml](../../security/trivy/ignore.yml) есть одно временное исключение, согласованное владельцем проекта 2026-10-05: `CVE-2026-93687` для `pkg:npm/braces@3.0.3` в `frontend/pnpm-lock.yaml`. На момент согласования исправленной версии не было; исключение разблокирует CI зависимостей до истечения срока 2026-10-19. Ответственные - сопровождающие проекта: исключение нужно удалить после появления исправления или пересмотреть до истечения срока. Trivy автоматически учитывает дату окончания. Файл исключений применяется только к проверке файлов; скрытые из блокирующего результата находки остаются видимыми в JSON-отчете. Проверка образов не изменяется.
|
||||
|
||||
|
||||
Reference in new issue
Block a user