feat: confine a compromised worker and drill its compromise end to end

- 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>
This commit is contained in:
2026-12-02 03:01:20 +03:00
co-authored by Claude Opus 5.5
parent ea3f791364
commit 4f2f940a07
53 changed files with 10062 additions and 101 deletions
+6
View File
@@ -277,6 +277,12 @@ IP). После закрытия всех changes план удаляется,
операции БД доступны и какие запрещены — до и после least privilege.
- Отзыв identity, ротация связанного секрета, восстановление обработки,
сохранность задач. Гипотезы, методика, результаты, ограничения — `REPORT.md`.
- Сделано: `make worker_compromise` (`infra/track1/`), права worker в S3 по префиксам, правила
значений в БД (`b9d27c4e1f03`), сверка результата уборщиком до удаления исходника, `make
jobs_audit`. «До» — код лабы 6 (`089d786`), а не права, выданные на ходу.
- Последнему шагу: `make failure_checks` целиком с новой ревизией и уборщиком, `make s3_check` в
сводке ACL; образ и digest — после обновлений патч-линии таблицу `make worker_compromise`
прогнать снова.
### Последний шаг (без change, ветка `feat/lab7-final`)