docs: record M4 security checks and scan triage
This commit is contained in:
@@ -584,3 +584,217 @@ $ make test-isolated; make failure-checks FAULT_ARGS=-rP # 19:17Z, 19:25Z
|
||||
# Итог: на PostgreSQL 18.7 права ролей — те же (матрица src/db_roles.py), у worker — только
|
||||
# таблицы конвейера по колонкам, DDL и программы сервера — отказ; отдельные стенды без
|
||||
# «permission denied». На машине замеров — повтор (промпт Codex).
|
||||
|
||||
|
||||
# --- Повтор на машине замеров ---
|
||||
# Дата: 2026-12-03 UTC. MacBook Air M4, macOS 26.6.2 (25G83), arm64,
|
||||
# Docker 28.0.4, ВМ 10 CPU / 10419826688 байт (9,70 ГиБ), Compose 5.6.1,
|
||||
# Python хоста / .venv 3.13.7; образ приложения Python 3.13.18.
|
||||
# Стенд: vladimirceva-lab7, https://localhost:8443; две реплики, телеметрия включена.
|
||||
# Код: исходный commit ee28cd7; правки рабочего дерева — разбор CVE и документы.
|
||||
# src_sha256: 813f5a036bed303920f288ee801be991627a90f9a2955ebd8014b3e8363e6c62.
|
||||
# Пины, конфигурации проекта, бизнес-код и пороги не менялись; seccomp daemon builtin.
|
||||
# Материалы оператора читали только разрешённые штатные команды; значений в выводе нет.
|
||||
# Домашний каталог — <home>, временный — <tmp>. Прежние прогоны — история.
|
||||
|
||||
# Начало UTC: 2026-12-03T17:05:36.856897+00:00; время команды 17.806 с.
|
||||
$ make storage-roles-check
|
||||
python3 scripts/lab7.py --ca-file "<home>/Высоконагруженные/mtusi2026lab7-vladimirceva/.pki/stand/ca.crt" storage-roles-check
|
||||
probe: api (its environment and network)
|
||||
probe: worker (its environment and network)
|
||||
probe: relay (its environment and network)
|
||||
probe: cleaner (its environment and network)
|
||||
probe: migrate (its environment and network)
|
||||
PASS api: postgres role -> api: api
|
||||
PASS api: role attributes and server roles -> none: none
|
||||
PASS api: role memberships -> none: none
|
||||
PASS api: database privileges beyond CONNECT -> none: none
|
||||
PASS api: CONNECT to other databases -> none: none
|
||||
PASS api: CREATE TABLE in public -> denied (42501): denied (42501)
|
||||
PASS api: ALTER TABLE attachments -> denied (42501): denied (42501)
|
||||
PASS api: DROP TABLE attachment_variants -> denied (42501): denied (42501)
|
||||
PASS api: SELECT attachment_job_replays -> denied (42501): denied (42501)
|
||||
PASS api: DELETE attachments -> denied (42501): denied (42501)
|
||||
PASS api: UPDATE attachment_jobs SET state -> denied (42501): denied (42501)
|
||||
PASS api: valkey without AUTH -> NOAUTH: NOAUTH
|
||||
PASS api: valkey AUTH default with the api password -> WRONGPASS: WRONGPASS
|
||||
PASS api: valkey api FLUSHALL -> NOPERM: NOPERM
|
||||
PASS api: valkey api CONFIG GET maxmemory -> NOPERM: NOPERM
|
||||
PASS api: valkey api KEYS * -> NOPERM: NOPERM
|
||||
PASS api: valkey api SCAN 0 -> NOPERM: NOPERM
|
||||
PASS api: valkey api INFO -> NOPERM: NOPERM
|
||||
PASS api: valkey api ACL LIST -> NOPERM: NOPERM
|
||||
PASS api: valkey api GET foreign key -> NOPERM: NOPERM
|
||||
PASS api: valkey api EVAL redis.call FLUSHALL -> NOPERM (script): NOPERM (script)
|
||||
PASS api: valkey api EVAL with foreign key -> NOPERM: NOPERM
|
||||
PASS api: valkey api SET / GET / DEL own key -> OK OK OK: OK OK OK
|
||||
PASS worker: postgres role -> worker: worker
|
||||
PASS worker: role attributes and server roles -> none: none
|
||||
PASS worker: role memberships -> none: none
|
||||
PASS worker: database privileges beyond CONNECT -> none: none
|
||||
PASS worker: CONNECT to other databases -> none: none
|
||||
PASS worker: CREATE TABLE in public -> denied (42501): denied (42501)
|
||||
PASS worker: ALTER TABLE attachments -> denied (42501): denied (42501)
|
||||
PASS worker: DROP TABLE attachment_variants -> denied (42501): denied (42501)
|
||||
PASS worker: INSERT users -> denied (42501): denied (42501)
|
||||
PASS worker: INSERT messages -> denied (42501): denied (42501)
|
||||
PASS worker: SELECT sessions -> denied (42501): denied (42501)
|
||||
PASS worker: SELECT users -> denied (42501): denied (42501)
|
||||
PASS worker: UPDATE attachments SET filename -> denied (42501): denied (42501)
|
||||
PASS worker: UPDATE attachments SET status (rolled back) -> allowed: allowed
|
||||
PASS relay: postgres role -> relay: relay
|
||||
PASS relay: role attributes and server roles -> none: none
|
||||
PASS relay: role memberships -> none: none
|
||||
PASS relay: database privileges beyond CONNECT -> none: none
|
||||
PASS relay: CONNECT to other databases -> none: none
|
||||
PASS relay: CREATE TABLE in public -> denied (42501): denied (42501)
|
||||
PASS relay: ALTER TABLE attachments -> denied (42501): denied (42501)
|
||||
PASS relay: DROP TABLE attachment_variants -> denied (42501): denied (42501)
|
||||
PASS relay: INSERT attachment_variants -> denied (42501): denied (42501)
|
||||
PASS cleaner: postgres role -> cleaner: cleaner
|
||||
PASS cleaner: role attributes and server roles -> none: none
|
||||
PASS cleaner: role memberships -> none: none
|
||||
PASS cleaner: database privileges beyond CONNECT -> none: none
|
||||
PASS cleaner: CONNECT to other databases -> none: none
|
||||
PASS cleaner: CREATE TABLE in public -> denied (42501): denied (42501)
|
||||
PASS cleaner: ALTER TABLE attachments -> denied (42501): denied (42501)
|
||||
PASS cleaner: DROP TABLE attachment_variants -> denied (42501): denied (42501)
|
||||
PASS cleaner: SELECT users -> denied (42501): denied (42501)
|
||||
PASS migrate: postgres role -> migrate: migrate
|
||||
PASS migrate: role attributes and server roles -> none: none
|
||||
PASS migrate: role memberships -> none: none
|
||||
PASS migrate: database privileges beyond CONNECT -> none: none
|
||||
PASS migrate: CONNECT to other databases -> none: none
|
||||
PASS migrate: CREATE TABLE in public (rolled back) -> allowed: allowed
|
||||
PASS api: catalog privileges = matrix: = matrix
|
||||
PASS cleaner: catalog privileges = matrix: = matrix
|
||||
PASS relay: catalog privileges = matrix: = matrix
|
||||
PASS worker: catalog privileges = matrix: = matrix
|
||||
PASS catalog: grants on tables to other roles = none: none
|
||||
PASS catalog: grants on tables to PUBLIC = none: none
|
||||
PASS valkey: ACL LOG denials of user api from the probe: 9
|
||||
s3: separate keys per process (api, worker, cleaner) — make s3-check
|
||||
storage-roles-check: PASS (68/68 checks, 17 s)
|
||||
cleanup: 0 probe container(s) removed, probe table exists: f, probe key exists: 0
|
||||
# Код make: 0.
|
||||
|
||||
# Начало UTC: 2026-12-03T17:05:54.664452+00:00; время команды 7.934 с.
|
||||
$ make storage-roles-check REPORT=1
|
||||
python3 scripts/lab7.py --ca-file "<home>/Высоконагруженные/mtusi2026lab7-vladimirceva/.pki/stand/ca.crt" storage-roles-check --report
|
||||
probe: api (its environment and network)
|
||||
probe: worker (its environment and network)
|
||||
probe: relay (its environment and network)
|
||||
probe: cleaner (its environment and network)
|
||||
probe: migrate (its environment and network)
|
||||
== api
|
||||
postgres role api
|
||||
role attributes and server roles none
|
||||
role memberships none
|
||||
database privileges beyond CONNECT none
|
||||
CONNECT to other databases none
|
||||
CREATE in schema public no
|
||||
DDL (CREATE TABLE, rolled back) denied (42501)
|
||||
server programs (COPY TO PROGRAM, by catalog) denied
|
||||
table alembic_version -
|
||||
table attachment_job_replays -
|
||||
table attachment_jobs SELECT INSERT
|
||||
table attachment_variants SELECT
|
||||
table attachments SELECT INSERT UPDATE(status updated_at)
|
||||
table chat_members SELECT INSERT
|
||||
table chats SELECT INSERT
|
||||
table idempotency_keys SELECT INSERT UPDATE(request_hash message_id created_at)
|
||||
table message_attachments SELECT INSERT
|
||||
table messages SELECT INSERT
|
||||
table sessions SELECT INSERT DELETE
|
||||
table users SELECT INSERT UPDATE(password_hash)
|
||||
valkey user api
|
||||
valkey ACL WHOAMI NOPERM
|
||||
valkey commands (operator) -@all +get +set +eval +evalsha +ttl +expire +incr +decr +del
|
||||
valkey keys (operator) ~messenger:v1:messenger:*
|
||||
== worker
|
||||
postgres role worker
|
||||
role attributes and server roles none
|
||||
role memberships none
|
||||
database privileges beyond CONNECT none
|
||||
CONNECT to other databases none
|
||||
CREATE in schema public no
|
||||
DDL (CREATE TABLE, rolled back) denied (42501)
|
||||
server programs (COPY TO PROGRAM, by catalog) denied
|
||||
table alembic_version -
|
||||
table attachment_job_replays -
|
||||
table attachment_jobs SELECT UPDATE(state next_attempt_at published_at lease_until last_error updated_at)
|
||||
table attachment_variants SELECT INSERT
|
||||
table attachments SELECT UPDATE(status updated_at error_code)
|
||||
table chat_members -
|
||||
table chats -
|
||||
table idempotency_keys -
|
||||
table message_attachments -
|
||||
table messages -
|
||||
table sessions -
|
||||
table users -
|
||||
== relay
|
||||
postgres role relay
|
||||
role attributes and server roles none
|
||||
role memberships none
|
||||
database privileges beyond CONNECT none
|
||||
CONNECT to other databases none
|
||||
CREATE in schema public no
|
||||
DDL (CREATE TABLE, rolled back) denied (42501)
|
||||
server programs (COPY TO PROGRAM, by catalog) denied
|
||||
table alembic_version -
|
||||
table attachment_job_replays INSERT
|
||||
table attachment_jobs SELECT UPDATE(state attempt attempt_base next_attempt_at published_at lease_until last_error updated_at)
|
||||
table attachment_variants -
|
||||
table attachments SELECT UPDATE(status updated_at error_code)
|
||||
table chat_members -
|
||||
table chats -
|
||||
table idempotency_keys -
|
||||
table message_attachments -
|
||||
table messages -
|
||||
table sessions -
|
||||
table users -
|
||||
== cleaner
|
||||
postgres role cleaner
|
||||
role attributes and server roles none
|
||||
role memberships none
|
||||
database privileges beyond CONNECT none
|
||||
CONNECT to other databases none
|
||||
CREATE in schema public no
|
||||
DDL (CREATE TABLE, rolled back) denied (42501)
|
||||
server programs (COPY TO PROGRAM, by catalog) denied
|
||||
table alembic_version -
|
||||
table attachment_job_replays -
|
||||
table attachment_jobs -
|
||||
table attachment_variants SELECT
|
||||
table attachments SELECT DELETE UPDATE(updated_at lost_at staging_key)
|
||||
table chat_members -
|
||||
table chats -
|
||||
table idempotency_keys -
|
||||
table message_attachments -
|
||||
table messages -
|
||||
table sessions -
|
||||
table users -
|
||||
== migrate
|
||||
postgres role migrate
|
||||
role attributes and server roles none
|
||||
role memberships none
|
||||
database privileges beyond CONNECT none
|
||||
CONNECT to other databases none
|
||||
CREATE in schema public yes
|
||||
DDL (CREATE TABLE, rolled back) allowed
|
||||
server programs (COPY TO PROGRAM, by catalog) denied
|
||||
table alembic_version SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table attachment_job_replays SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table attachment_jobs SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table attachment_variants SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table attachments SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table chat_members SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table chats SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table idempotency_keys SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table message_attachments SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table messages SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table sessions SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
table users SELECT INSERT UPDATE DELETE TRUNCATE
|
||||
REPORT: capabilities of each process credentials (no verdict)
|
||||
cleanup: 0 probe container(s) removed, probe table exists: f, probe key exists: 0
|
||||
# Код make: 0.
|
||||
|
||||
Reference in New Issue
Block a user