feat: audit the whole trust matrix in one command and complete the threat model
- make security_audit runs the existing negative checks per trust-matrix row plus an ingress TLS probe and prints one summary - close the threat model TODOs and stale references - re-take the coverage exclusion evidence on the lab 7 stand Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: run-mtusi-messenger
|
||||
description: Запустить, остановить, прогнать и подёргать API мессенджера MTUSI (FastAPI, PostgreSQL, Valkey; лаба 3 — HAProxy перед репликами API; лаба 4 — S3 на SeaweedFS; лаба 5 — RabbitMQ, relay и worker; лаба 6 — OTel Collector, Prometheus, Loki, Tempo и Grafana; лаба 7 — HTTPS на :8443, mTLS LB → API, локальный CA) — на хосте или в Docker. Use when asked to run / start / stop the server or the stand, check telemetry (find a request in Loki and Tempo, Grafana provisioning, Collector outage, stand from scratch), run the smoke test, `make test`, `make student_test`, `make test_isolated`, `make test-persistence` or `make test-failover`, `make s3_check`, `make mtls_check` (mTLS LB → API negative checks), `make storage_tls_check` (TLS to PostgreSQL, Valkey and S3 negative checks), `make broker_mtls_check` (mTLS to RabbitMQ, relay and worker rights negative checks), `make telemetry_tls_check` (mTLS to the OTel Collector gateway negative checks), `make hardening_check` (container capabilities, users, read-only roots, pids limits, ports), `make scan` (image and uv.lock vulnerability scan with triage), `make rotation_check` / `rotate_leaf` / `revoke_identity` / `rotate_secret` / `pki_renew` (rotation and revocation on the running stand), `make worker_compromise` (track 1 drill on an isolated stand), `make jobs_audit` (damaged jobs after an incident), `make pki_stand` / `pki_status` (stand certificates), check that the S3 bucket is private, run the defense scenario or its failure windows, check the broker, the worker or the relay process, show the pipeline state, stop or restore an API replica, show X-Instance-Id distribution, check that an API change works on a live server, send a request to an endpoint, reproduce a bug over HTTP, check the containers, or call services directly without HTTP.
|
||||
description: Запустить, остановить, прогнать и подёргать API мессенджера MTUSI (FastAPI, PostgreSQL, Valkey; лаба 3 — HAProxy перед репликами API; лаба 4 — S3 на SeaweedFS; лаба 5 — RabbitMQ, relay и worker; лаба 6 — OTel Collector, Prometheus, Loki, Tempo и Grafana; лаба 7 — HTTPS на :8443, mTLS LB → API, локальный CA) — на хосте или в Docker. Use when asked to run / start / stop the server or the stand, check telemetry (find a request in Loki and Tempo, Grafana provisioning, Collector outage, stand from scratch), run the smoke test, `make test`, `make student_test`, `make test_isolated`, `make test-persistence` or `make test-failover`, `make s3_check`, `make mtls_check` (mTLS LB → API negative checks), `make storage_tls_check` (TLS to PostgreSQL, Valkey and S3 negative checks), `make broker_mtls_check` (mTLS to RabbitMQ, relay and worker rights negative checks), `make telemetry_tls_check` (mTLS to the OTel Collector gateway negative checks), `make hardening_check` (container capabilities, users, read-only roots, pids limits, ports), `make scan` (image and uv.lock vulnerability scan with triage), `make security_audit` (the whole trust matrix, ACL and telemetry leaks in one command), `make rotation_check` / `rotate_leaf` / `revoke_identity` / `rotate_secret` / `pki_renew` (rotation and revocation on the running stand), `make worker_compromise` (track 1 drill on an isolated stand), `make jobs_audit` (damaged jobs after an incident), `make pki_stand` / `pki_status` (stand certificates), check that the S3 bucket is private, run the defense scenario or its failure windows, check the broker, the worker or the relay process, show the pipeline state, stop or restore an API replica, show X-Instance-Id distribution, check that an API change works on a live server, send a request to an endpoint, reproduce a bug over HTTP, check the containers, or call services directly without HTTP.
|
||||
---
|
||||
|
||||
REST API мессенджера (пользователи, чаты, сообщения) — сервер на
|
||||
@@ -1191,6 +1191,26 @@ uv run --frozen python infra/scan/scan.py --only python --project-dir <копи
|
||||
- Рабочий стенд scan не трогает: тег `mtusi-messenger:scan`, контейнеры сканера — с меткой
|
||||
`mtusi.scan`, без сети и сокета Docker.
|
||||
|
||||
## Лаба 7: аудит матрицы доверия
|
||||
|
||||
Последний шаг лабы 7 (`audit.md`). Не команда драйвера: `infra/audit/audit.py` (системный
|
||||
`python3`) зовёт команды драйвера выше подпроцессами и сводит их коды по строкам
|
||||
`contracts/trust-matrix.md`.
|
||||
|
||||
```bash
|
||||
make security_audit # ~4–5 мин: проверки по одной, затем сводка «строка матрицы → проверка → итог»; 0 / 1 / 2, make — 0 или ненулевой
|
||||
make security_audit REPORT=1 # та же сводка без вердикта
|
||||
make security_audit ONLY=storage-roles-check,ingress-tls # только эти проверки, остальные строки — «not run»
|
||||
make security_audit AUDIT_LOGS=/tmp/audit # сохранить вывод каждой проверки (по умолчанию — временный каталог)
|
||||
```
|
||||
|
||||
- Проверки: `ingress-tls` (своя проба внешнего TLS), `test-security` (публичный `tests/security.py`),
|
||||
`mtls-check`, `storage-tls-check`, `storage-roles-check`, `s3-check`, `broker-mtls-check`,
|
||||
`telemetry-tls-check`, `openbao-check`, `auth-storage`, `telemetry-leaks` (`telemetry-check`: только
|
||||
проба приватности — известная строка `service.version` вердикт не меняет, она в примечании),
|
||||
`hardening-check`. Ротацию, отзыв, сессии и предел входа аудит не трогает — строка называет
|
||||
команду вне аудита.
|
||||
|
||||
## Direct invocation (без HTTP)
|
||||
|
||||
Для правок в `src/core/` сервисы вызываются поверх единицы работы, сервер не
|
||||
|
||||
Reference in New Issue
Block a user