ЛР 7 — БВТ2301 — Сафронов — на 5 #87

Open
ricoroma wants to merge 106 commits from ricoroma/mtusi2026lab7-safronov:solution/bvt2301-safronov into main
First-time contributor

Лабораторная 7

Автор / группа: Сафронов Роман Николаевич, БВТ2301
Целевая оценка (3/4/5): 5
Трек 5, если заявлен: трек 1 «Компрометация worker»

Что реализовано и что перенесено: код лабы 6 перенесён commit 089d786. Бизнес-API прежний, меняется только транспорт — HTTPS. Сделано 14 changes OpenSpec:

  • локальный CA оператора и внешний HTTPS;
  • обязательное mTLS LB → API с allowlist identity;
  • TLS 1.3 ко всем хранилищам, роли PostgreSQL и ACL Valkey на каждый процесс;
  • mTLS и EXTERNAL к RabbitMQ;
  • mTLS-шлюзы OTLP и хранилищ телеметрии;
  • OpenBao вне dev-mode, с cert auth и политикой на процесс;
  • Argon2id по замеру, с rehash; общий предел входа и бюджет хэшей; предел тела;
  • hardening контейнеров;
  • make scan с разбором;
  • ротация и отзыв без сборки;
  • трек 1: права worker по префиксам S3 и правилам БД, make jobs_audit, учения make worker_compromise.

Ещё модель угроз (security/THREAT_MODEL.md), матрица доверия (contracts/trust-matrix.md) и аудит всей матрицы одной командой (make security_audit). Таблица changes — REPORT.md, раздел «Архитектура и решения».

Команды запуска из чистого clone: make run_docker (сам создаёт CA, инициализирует и распечатывает OpenBao), затем make replicas, make check, make test, make student_test. Действия оператора, порты, второй способ запуска, остановка и make wipe_data — REPORT.md, раздел «Запуск из чистого clone».

Результаты проверок и ссылка на REPORT.md: таблица «Доказательства критериев» в REPORT.md — по строке на каждый пункт рубрики 3, 4 и трека 1, с командой, наблюдением и файлом evidence/.

  • Из чистого clone (274ccbd, evidence/tests/clean-clone.md) все шаги дали код 0: make check, make test и make test-security PASS, make student_test — 235 passed, persistence и failover PASS.
  • Полный make failure_checks на c305d4a — 166 passed.
  • Замеры (login baseline2, uploads baseline2, queue baseline4) и отказы — раздел «Эксперименты и отказы».
  • Трек 1 — раздел «Трек 1. Компрометация worker»: H1–H5 подтверждены на двух прогонах, контроли дали код 1.

Ограничения / известные ошибки (REPORT.md, раздел «Ограничения и следующие шаги»):

  • решения автора: обновления образов поставлены до конца выдержки в 7 суток; клиенты хранилищ без CRL; сетевой вход суперпользователя PostgreSQL оставлен риском;
  • два принятых риска scan до 2026-12-27;
  • граница привилегий worker — контейнер;
  • 15 записей KNOWN_ISSUES.md;
  • не подтвердились гипотезы login H2, uploads H1 и H2, queue H2 и H4.

Источники и использование ИИ: REPORT.md, раздел «Источники, библиотеки и использование ИИ». Работа сделана в Claude Code по циклу OpenSpec, каждую стадию вёл отдельный агент. Решения автора — в QUESTIONS.md и последней версии плана (git show 274ccbd:PLAN.md). Evidence сняты командами.

  • Весь обязательный минимум текущей и предыдущих работ сохранён с объявленными переходами (make test-persistence, make test-failover, evidence исключений сверки покрытия — REPORT.md, «Доказательства критериев»).
  • Контракт и публичные тесты не ослаблены (git diff main: tests/ и README.md без изменений, в contracts/ — только trust-matrix.md).
  • make check и make test выполнены; приложен реальный вывод (evidence/tests/clean-clone.md).
  • Сценарии отказов/безопасности своего уровня воспроизведены (make failure_checks, make security_audit, make rotation_check, make worker_compromise — evidence/security/).
  • Все секреты и приватные ключи находятся вне Git; отчёт не содержит tokens (evidence/security/pki.md, evidence/security/openbao-secrets.md, раздел 12, evidence/tests/clean-clone.md).
  • README задания сохранён, REPORT.md содержит инструкцию именно моего решения.
## Лабораторная 7 Автор / группа: Сафронов Роман Николаевич, БВТ2301 Целевая оценка (3/4/5): 5 Трек 5, если заявлен: трек 1 «Компрометация worker» Что реализовано и что перенесено: код лабы 6 перенесён commit `089d786`. Бизнес-API прежний, меняется только транспорт — HTTPS. Сделано 14 changes OpenSpec: - локальный CA оператора и внешний HTTPS; - обязательное mTLS LB → API с allowlist identity; - TLS 1.3 ко всем хранилищам, роли PostgreSQL и ACL Valkey на каждый процесс; - mTLS и EXTERNAL к RabbitMQ; - mTLS-шлюзы OTLP и хранилищ телеметрии; - OpenBao вне dev-mode, с cert auth и политикой на процесс; - Argon2id по замеру, с rehash; общий предел входа и бюджет хэшей; предел тела; - hardening контейнеров; - `make scan` с разбором; - ротация и отзыв без сборки; - трек 1: права worker по префиксам S3 и правилам БД, `make jobs_audit`, учения `make worker_compromise`. Ещё модель угроз (`security/THREAT_MODEL.md`), матрица доверия (`contracts/trust-matrix.md`) и аудит всей матрицы одной командой (`make security_audit`). Таблица changes — `REPORT.md`, раздел «Архитектура и решения». Команды запуска из чистого clone: `make run_docker` (сам создаёт CA, инициализирует и распечатывает OpenBao), затем `make replicas`, `make check`, `make test`, `make student_test`. Действия оператора, порты, второй способ запуска, остановка и `make wipe_data` — `REPORT.md`, раздел «Запуск из чистого clone». Результаты проверок и ссылка на REPORT.md: таблица «Доказательства критериев» в `REPORT.md` — по строке на каждый пункт рубрики 3, 4 и трека 1, с командой, наблюдением и файлом `evidence/`. - Из чистого clone (`274ccbd`, `evidence/tests/clean-clone.md`) все шаги дали код 0: `make check`, `make test` и `make test-security` PASS, `make student_test` — 235 passed, persistence и failover PASS. - Полный `make failure_checks` на `c305d4a` — 166 passed. - Замеры (login `baseline2`, uploads `baseline2`, queue `baseline4`) и отказы — раздел «Эксперименты и отказы». - Трек 1 — раздел «Трек 1. Компрометация worker»: H1–H5 подтверждены на двух прогонах, контроли дали код 1. Ограничения / известные ошибки (`REPORT.md`, раздел «Ограничения и следующие шаги»): - решения автора: обновления образов поставлены до конца выдержки в 7 суток; клиенты хранилищ без CRL; сетевой вход суперпользователя PostgreSQL оставлен риском; - два принятых риска scan до 2026-12-27; - граница привилегий worker — контейнер; - 15 записей `KNOWN_ISSUES.md`; - не подтвердились гипотезы login H2, uploads H1 и H2, queue H2 и H4. Источники и использование ИИ: `REPORT.md`, раздел «Источники, библиотеки и использование ИИ». Работа сделана в Claude Code по циклу OpenSpec, каждую стадию вёл отдельный агент. Решения автора — в `QUESTIONS.md` и последней версии плана (`git show 274ccbd:PLAN.md`). Evidence сняты командами. - [x] Весь обязательный минимум текущей и предыдущих работ сохранён с объявленными переходами (`make test-persistence`, `make test-failover`, evidence исключений сверки покрытия — `REPORT.md`, «Доказательства критериев»). - [x] Контракт и публичные тесты не ослаблены (`git diff main`: `tests/` и `README.md` без изменений, в `contracts/` — только `trust-matrix.md`). - [x] make check и make test выполнены; приложен реальный вывод (`evidence/tests/clean-clone.md`). - [x] Сценарии отказов/безопасности своего уровня воспроизведены (`make failure_checks`, `make security_audit`, `make rotation_check`, `make worker_compromise` — `evidence/security/`). - [x] Все секреты и приватные ключи находятся вне Git; отчёт не содержит tokens (`evidence/security/pki.md`, `evidence/security/openbao-secrets.md`, раздел 12, `evidence/tests/clean-clone.md`). - [x] README задания сохранён, REPORT.md содержит инструкцию именно моего решения.
ricoroma added 106 commits 2026-12-04 19:36:47 +03:00
Source: mtusi2026lab6-safronov, solution/bvt2301-safronov, 6c6a065.
Files follow AGENTS.md, "Переход в следующую лабу". Contracts, public
tests, README, REPORT and evidence of lab 6 are not carried over; infra
and scripts of the lab 7 skeleton stay as they are.
Makefile is the lab 6 one with the lab 7 skeleton part restored
(HTTPS BASE_URL on 8443, test-security); .gitignore and .dockerignore
are taken from lab 6 because both skeletons have the same files;
.env.example is the lab 6 one without changes.
The compose project, image and CI prefix are renamed to lab7, and
references to the previous lab now name lab6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Local CA script, HTTPS ingress on :8443, mandatory mTLS LB -> API
with an identity allowlist, separate health listener, random
X-Instance-Id alias; tests, hooks and driver over HTTPS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Disable TLS 1.3 session tickets on the API so an aborted upload body
frees its slot at once; k6 trusts only the run CA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply auth-hardening up to the bench_login label: Argon2id parameters
from [auth] chosen by driver.py argon2-params (m=64 MiB, t=2, p=1),
rehash on login, per-process KDF budget with 429, shared login failure
limit in Valkey with a local fallback, X-Forwarded-For from HAProxy,
64 KiB body limit (400) in LB and middleware, bench login profile,
tests, threat model and trust matrix rows. Hypotheses H1-H4 are
committed here before the baseline label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first baseline attempt on 13fdd18 lost CPU and peak memory of the
"before" variant: its replicas died inside the window and the profile
did not notice. Poll memory.peak during the window, inspect replicas
after it (OOMKilled, exit code, time of death), add oom / replica_died
marks and base H4 on them. The attempt is kept out of git and recorded
in QUESTIONS.md; the label is retaken as baseline2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User decision 2026-11-17: the 35-minute baseline2 label and its H1-H4
verdicts are taken with the other long measurements on a quiet host.
Apply auth-hardening closes without them; tasks 9.4 and 11.3 keep the
moved part as a note, PLAN.md lists it in the last step (decision 10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the body-limit rule from HAProxy (user decision 2026-11-18): the
replica middleware answers 400 with X-Instance-Id, tests require the
header again. Widen the failure_checks selection in the trust matrix,
name 13fdd18 in the evidence header, document Valkey LRU eviction of
login counters and the allowlist as trusted X-Forwarded-For senders,
check waited_ms of KDF budget rejections in the queue scenario.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reserve returned after a KDF budget rejection or 503 left a zero key
in Valkey until the end of the window, so a flood with new usernames
created keys past the address limit and could evict real counters.
SETTLE_SCRIPT and LocalLoginLimiter now delete a counter at zero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TLS to PostgreSQL (verify-full), Valkey and S3 for all clients and
stands; database roles and Valkey ACL split off as storage-roles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Storage servers accept only TLS 1.3 (pg_hba hostssl / hostnossl reject,
Valkey port 0, S3 gateway HTTPS only) with stand identities postgres,
valkey and s3. Clients trust only the stand CA from [client_tls] ca_file
and check the host name; no switch to disable verification. Processes
exit with code 2 without a CA or with an IP storage address. Temporary
stands, CI and bench/ run on TLS storages; make storage_tls_check adds
negative checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Broker accepts only TLS 1.3 with a client certificate checked against the
stand CRL; login is EXTERNAL by certificate DNS SAN, broker passwords are
gone. Relay may declare its queue and publish, worker may only consume.
Definitions and TLS material checks come from infra/rabbitmq/start.sh;
temporary stands, CI, bench and the fault hook use the same mTLS identities.
Adds make broker_mtls_check [REPORT=1] and drops the rollback broker compose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenBao 2.7.3 (raft, TLS 1.3 with client certificates) holds the
PostgreSQL role passwords, the Valkey password and the S3 keys; each
process logs in with its own mTLS identity, reads only its paths and
renews its token in the background. Operator init, unseal, configure
and seed go through infra/openbao/bao.py and make bao_*; checks are
make bao_check and driver.py openbao-outage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bao_check now compares cert auth roles and policies in OpenBao with
the repository and tries every foreign identity against every role
and without a role name; API and migrations exit with code 2 on
invalid settings; stop-at-start runs its attempts next to the stand's
OpenBao again; openbao-outage checks the exit code, the record and
the restart; run_docker restarts only services started before seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every stand with its own storages now brings up its own OpenBao and acts
as its operator: materials live in the run's temporary directory and are
removed on any outcome; the working stand's OpenBao is never touched.

- make failure_checks: own OpenBao, 20 s / 60 s token roles, six new
  OpenBao fault checks, hook actions and the secrets log summary
- bao.py rewrite and waiting for the active node after unseal
- bench/: OpenBao in every fresh stand, "before" variants get secrets
  via ${...} references, passport stand.secrets and limits.openbao
- CI job: BAO_ADDRESS, run OpenBao operator, override with openbao,
  cleaner and migrate pairs, test_ci_override.py
- driver: shared temporary stand for freeze-lb and reconcile-signal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- secrets summary: per-life gap between logins (OpenBao outages
  excluded) catches a renewal thread that died after the first login;
  delta and rule updated, fast tests on synthetic logs
- record the apply deviation (operator materials read by the leak scan)
  and switch the leak scan to patterns
- test_secret_new_version checks N -> N+1, sealed-by-operator test
  unseals right after the waiting record
- driver: operator dir refusal exits with code 2
- fast test for Operator.wait_active, check counts 158 -> 164

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every service of the stand gets the x-hardening anchor (cap_drop ALL,
no-new-privileges, read-only root) with an empty exception table, tmpfs
with size limits, pids limits by measurement and non-root users for
PostgreSQL, Valkey, RabbitMQ and SeaweedFS. The S3 gateway gRPC accepts
only mTLS with the stand CA. make hardening_check checks inspect data,
processes and listeners against the compose model; a fast test keeps the
override files from removing restrictions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loki gets a /tmp tmpfs for its retention marks (the compactor failed on
the read-only root), hardening_check reads each container's log since
start for write errors, the fast test covers override mounts and the
driver and bench overrides, s3-bootstrap /data is narrowed to its user,
spec wording and docs are corrected, Tempo's exit 137 on stop is recorded
as a known issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recheck processes with a privilege sign in hardening-check and fail only
when the same process (PID and start time) keeps the sign in every scan,
so the transient runc process of any docker exec no longer gives a false
FAIL; run the root-write probe after the process probes. Name the second
Loki retention error form, fix the exit-code wording in the threat model
and record the live Loki retention probe in the evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verify every uv.lock export hash against the PyPI file digests of its
release (pip-audit only requires hashes), fail on skipped dependencies
and on a root operator UID, export the dev group with all extras, state
the script and make exit codes like the other checks, bound Python
updates by pyproject.toml in the spec, name the fix versions in triage
records, cover the GSSENC path with a keytab control, and record the
RabbitMQ CLI listener false FAIL of hardening_check in KNOWN_ISSUES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hand pip-audit a marker-free requirements file built from the uv.lock
export so every lock entry is audited regardless of the operator
platform, and fail when a lock entry is missing from the pip-audit
output; fetch PyPI digests on daemon threads so an interrupted scan
exits at once; reshoot the vulnerable-lock control and name the fix
versions in the remaining triage records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md had grown to 198k characters, far past what agents load per
session. Keep the invariants, pointers and main commands (27 KB); the
former file moves unchanged to .claude/reference/agents.md, which is read
on demand. Note the due triage reviews in the final step of PLAN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add operator commands for leaf and secret rotation, identity revocation
and CRL renewal without rebuilding images, and a drill under load.
A rejected PostgreSQL role password is now 503 instead of 500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Close handshakes and logins that started before a revocation or a
password change, converge after a failure in any phase, survive a closed
terminal, lock parallel commands and make the drill detect a dead load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name only the repeat of rotate_secret while sessions of the previous
PostgreSQL password may stay open, compare KV version time with the
container start when the load record is gone, refuse run_docker and
rolling_update next to a running rotation, defer SIGQUIT, and name the
remaining windows and cases in the trust matrix and threat model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the hold mark of an identity whose revocation has started whatever
signal ends pki.sh, refuse every rotation command while the files of a
held identity are missing, bound the handshake of the LB metrics port,
name sessions of another password until verify ends, and run Makefile
prerequisites in order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name restarting both the LB and the replicas when the LB has no ready
replica, state the measured 25 s bound of the LB metrics port, narrow the
missing files of a held identity to its certificate, and cover refusals
and signals during CRL issue with fast tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- narrow the worker S3 user to staging reads and attachments writes
- add database rules the worker role cannot bypass: no return to pending,
  variant keys of its own attachment, known error codes only
- let the cleaner remove a ready source only after its own SHA-256 check
- add make jobs_audit [REPAIR=1] to name and requeue damaged jobs
- add make worker_compromise: isolated before/after stands, one operation
  table, response windows, job safety, controls and committed hypotheses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- restore a verified row by fact: three variants give ready, otherwise
  failed with a known code instead of ready without content
- check trigger functions are not SECURITY DEFINER and pin search_path
- record the working stand comparison, the permanent drill lock file and
  the remaining SeaweedFS details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- user decision 2026-12-02: no waiting for the 7-day soak, one-time exception
- drop triage entries the updates fixed (zlib, apt, krb5)
- record the CRL decision for storage clients and the fresh-image risk

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- reject inf/nan in every float setting; service.version 1.7.0
- close API storage clients within one 0.5 s window on shutdown
- SeaweedFS admin identity via -s3.config, no access key id in log
- RabbitMQ CLI distribution listener on loopback only
- fix timing-dependent checks: test_issue_not_after,
  test_hung_worker_lease_fencing, reconcile-cycle, reconcile-signal

User decision 2026-12-02: fix the cheap known issues; two scenarios
added to main specs directly, without an OpenSpec change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- bench_login baseline2, bench_uploads baseline, bench_queue baseline4 on 0d84af0
- worker_compromise and three controls on HAProxy 3.4.8, PostgreSQL 18.7, Python 3.12.16
- full failure_checks: test_staging_cleanup_survives_outage failed, cause under analysis

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- bench_uploads baseline2 on 0ca9e31 (code 0d84af0), dirty: false, 72/72
- H1-H4 verdicts match baseline (H1 no, H2 no, H3 yes, H4 yes); baseline stays as a dirty repeat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test_staging_cleanup_survives_outage relied on an empty cleaner queue,
which the storage-consistency delta of track1-worker-compromise
(decision 7) no longer provides: ready rows whose original does not
match stay staging candidates on every pass, candidates go by
(updated_at, id), and an S3 outage stops the pass at the first one.
Age the test row by a day so it is the oldest candidate and drop the
drain step; the scenario checks are unchanged.

Record the red and green runs and the full failure_checks run in the
track1 evidence, the per-pass re-read of mismatched originals in
KNOWN_ISSUES and the report, and the decision in QUESTIONS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fill every template section of REPORT.md: header, clean clone startup with
operator steps, architecture, one criteria row per rubric item, label and
fault experiments, limitations and AI usage. The clean clone results are
still marked and follow in the next commit.

Record the full make failure_checks on c305d4a (166 passed, fault 0,
postgres 0, secrets 0) in the track1 evidence, and the unexplained TLS
handshake drop of test_pool_keeps_connections in KNOWN_ISSUES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: record the clean clone check and close the lab 7 plan
Application / application (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
f35a888ae6
Record the clean clone check of 274ccbd in evidence/tests/clean-clone.md:
own compose project on shifted ports and its own operator PKI, make
run_docker created the CA, initialized and unsealed OpenBao by itself,
then check, test, test-security, student_test (235 passed),
test-persistence, test-failover and validate all exited 0, with no
secret values in the logs. Fill the remaining report cells from it.

Remove PLAN.md now that every change and the last step are closed, as
its header says; point AGENTS.md, the reference and the bench rule to
git show 274ccbd:PLAN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some checks are pending
2 workflow awaiting approval

The workflow will only run after approval from the repository maintainer.

Application / application (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u https://gitea.privcloud.tech/ricoroma/mtusi2026lab7-safronov solution/bvt2301-safronov:ricoroma-solution/bvt2301-safronov
git checkout ricoroma-solution/bvt2301-safronov
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mtusi2026/mtusi2026lab7#87