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:
2026-12-02 07:08:10 +03:00
co-authored by Claude Opus 5.5
parent bb20855f34
commit 7b2defab01
19 changed files with 1564 additions and 12 deletions
+40
View File
@@ -0,0 +1,40 @@
# Сохранность при рестарте стенда
- Команда: `make test-persistence ACTION_SCRIPT=scripts/restart.sh` (Makefile передаёт `--base-url https://localhost:8443 --ca-file .pki/stand/ca.crt`)
- Дата: 2026-12-02, 03:43:25–03:43:56 UTC; код выхода 0
- Commit: `bb20855` (ветка `feat/lab7-final`); рабочее дерево — правки последнего шага, часть 2 (аудит матрицы, документы, файлы `evidence/`), код образа = `HEAD`
- Стенд: проект compose `mtusi-lab7`, телеметрия включена, собран `make run_docker` из рабочего дерева; OpenBao распечатан и hook его не трогает
- Что проверяет публичная проверка: данные, прежний токен и с лабы 4 оригинал вложения после hook (`tests/README.md`)
- Что перезапустил hook (сверка `docker inspect` до и после, `RestartCount` у всех 0): `api-183`, `api-184`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — новый `StartedAt`; `relay`, `worker` и `cleaner` hook не трогает, `StartedAt` прежний; сервисы телеметрии, их шлюзы и `openbao` — тоже прежний. Одноразовые `postgres-bootstrap`, `migrate` и `s3-bootstrap` повторяет `start api` (no-op). Реплики после рестарта прочитали секреты из OpenBao без действий оператора. Volumes не удалялись
```text
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
```
| Контейнер | `StartedAt` до | `StartedAt` после |
|---|---|---|
| `api-183` | 03:43:22.332 | 03:43:53.039 |
| `api-184` | 03:43:22.472 | 03:43:53.187 |
| `haproxy-1` | 03:33:20.990 | 03:43:53.345 |
| `postgres-1` | 03:33:11.992 | 03:43:28.080 |
| `rabbitmq-1` | 03:42:40.120 | 03:43:29.043 |
| `s3-1` | 03:33:11.131 | 03:43:42.954 |
| `valkey-1` | 03:38:26.477 | 03:43:27.944 |
| `postgres-bootstrap-1` | 03:43:15.401 | 03:43:47.536 |
| `migrate-1` | 03:43:19.682 | 03:43:50.792 |
| `s3-bootstrap-1` | 03:43:15.577 | 03:43:47.675 |
| `relay-1` | 03:33:20.377 | 03:33:20.377 |
| `worker-1` | 03:33:20.509 | 03:33:20.509 |
| `cleaner-1` | 03:33:20.260 | 03:33:20.260 |
| `openbao-1` | 03:33:00.990 | 03:33:00.990 |
| `otel-gateway-1` | 03:33:12.279 | 03:33:12.279 |
| `otel-collector-1` | 03:37:11.769 | 03:37:11.769 |
| `loki-gateway-1` | 03:33:10.947 | 03:33:10.947 |
| `loki-1` | 03:37:12.349 | 03:37:12.349 |
| `tempo-gateway-1` | 03:33:11.034 | 03:33:11.034 |
| `tempo-1` | 03:37:14.758 | 03:37:14.758 |
| `prometheus-gateway-1` | 03:33:11.662 | 03:33:11.662 |
| `prometheus-1` | 03:37:11.768 | 03:37:11.768 |
| `grafana-1` | 03:33:11.815 | 03:33:11.815 |
Значения «до» позже старта стенда (03:33): `valkey-1` — 03:38, его перезапустил возврат контроля аудита (`evidence/security/security-audit.md`); `otel-collector`, `loki`, `tempo`, `prometheus` — 03:37, их перезапустил `telemetry-check` аудита; `rabbitmq-1` — 03:42, его остановил и вернул `driver.py broker-check` (`evidence/broker/stand.md`); `api-183` и `api-184` — 03:43, их пересоздал повтор отправки (`evidence/idempotency/replay-after-restart.md`).