ЛР7: прогон в Docker, исправления по результатам, evidence и отчёт

This commit is contained in:
LOSYASH
2026-12-03 16:54:53 +01:00
parent cbbe525b3e
commit 17baa0dd7e
47 changed files with 1934 additions and 65 deletions
+108
View File
@@ -0,0 +1,108 @@
# attachments
# date: 2026-12-03T16:37:01 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/attachments.py --base-url https://localhost:8443
== позитивный сценарий ==
ok - upload PNG -> 202 (got 202)
ok - 202 queued, variants=[], error_code=null
ok - sha256/size describe the original
ok - no S3 key/bucket in public JSON
ok - upload JPEG with Unicode filename -> 202 (got 202)
ok - filename returned as is (display only)
ok - both become ready (worker)
ok - member downloads PNG -> 200 (got 200)
ok - downloaded bytes are identical (sha256)
ok - true Content-Type image/png
ok - nosniff header
ok - member downloads JPEG (variant=original) -> 200 (got 200)
ok - JPEG bytes and type
ok - message with empty text + 2 attachments -> 201 (got 201)
ok - attachment_ids kept in request order
ok - history shows attachment_ids
ok - text-only POST (lab3) still valid, attachment_ids=[]
ok - member reads metadata -> 200 (got 200)
ok - thumbnail variant exists in lab5 -> 200 (got 200)
ok - unknown variant name -> 400 (got 400)
== доступ ==
ok - outsider GET attachment metadata -> 404 (got 404)
ok - unknown attachment metadata -> 404 (got 404)
ok - outsider GET attachment/content -> 404 (got 404)
ok - unknown attachment/content -> 404 (got 404)
ok - anonymous download -> 401 (got 401)
ok - attachment id is not a UUID -> 400 (got 400)
ok - outsider uploads into foreign chat -> 404 (got 404)
ok - anonymous upload -> 401 (got 401)
== привязка к сообщению ==
ok - eve uploads into her own chat -> 202 (got 202)
ok - alice uploads into her second chat -> 202 (got 202)
ok - foreign attachment_id (eve's chat) in message -> 404 (got 404)
ok - attachment of ANOTHER chat of the same user -> 404 (got 404)
ok - unknown attachment_id -> 404 (got 404)
ok - one valid + one foreign -> whole message rejected -> 404 (got 404)
ok - duplicate attachment_ids -> 400 (got 400)
ok - same UUID in different case is a duplicate -> 400 (got 400)
ok - more than 10 attachment_ids -> 400 (got 400)
ok - attachment_id is not a UUID -> 400 (got 400)
ok - attachment_ids: null -> 400 (got 400)
ok - blank text without attachments -> 400 (got 400)
ok - text field is required -> 400 (got 400)
ok - any member may reference a chat attachment again -> 201 (got 201)
ok - eve attaches alice's file to her own chat -> 404 (got 404)
== идемпотентность с вложениями ==
ok - missing attachment_ids == [] (same Message)
ok - same key, different attachment_ids -> 409 (got 409)
ok - replay with attachments returns the same Message
== размер ==
ok - Content-Length = 10 MiB + 1, body never sent (limit before reading) -> 413 (got 413)
ok - Content-Length = 500 MiB -> 413 (got 413)
ok - chunked body > 10 MiB without Content-Length (stream cut at limit) -> 413 (got 413)
ok - real PNG of 11424262 bytes -> 413 (got 413)
ok - empty body -> 400 (got 400)
== пиксели ==
ok - decompression bomb 8000x8000 in 62290 bytes -> 413 (got 413)
ok - 40 040 001 pixels (just over the limit) -> 413 (got 413)
== повреждённые файлы ==
ok - truncated PNG -> 415 (got 415)
ok - truncated PNG: error code
ok - PNG with flipped byte (CRC) -> 415 (got 415)
ok - PNG with flipped byte (CRC): error code
ok - PNG signature only -> 415 (got 415)
ok - PNG signature only: error code
ok - PNG header + garbage -> 415 (got 415)
ok - PNG header + garbage: error code
ok - truncated JPEG -> 415 (got 415)
ok - truncated JPEG: error code
ok - JPEG SOI + garbage -> 415 (got 415)
ok - JPEG SOI + garbage: error code
== fuzz: случайные порчи байтов (только 202 или 415, никогда 500) ==
ok - 30 corrupted files -> only 202/415 (got [202, 415])
== подмена MIME ==
ok - PNG bytes sent as image/jpeg -> 415 (got 415)
ok - JPEG bytes sent as image/png -> 415 (got 415)
ok - text renamed to .png -> 415 (got 415)
ok - GIF sent as image/png -> 415 (got 415)
ok - HTML sent as image/jpeg -> 415 (got 415)
ok - PNG with Content-Type image/gif -> 415 (got 415)
ok - PNG with Content-Type application/octet-stream -> 415 (got 415)
ok - PNG with Content-Type text/html -> 415 (got 415)
== опасные filename ==
ok - filename '../../etc/passwd' -> 400 (got 400)
ok - filename 'dir/a.png' -> 400 (got 400)
ok - filename 'C:\\Windows\\a.png' -> 400 (got 400)
ok - filename 'a\x00.png' -> 400 (got 400)
ok - filename 'a\nb.png' -> 400 (got 400)
ok - filename 'tab\t.png' -> 400 (got 400)
ok - filename '\x1b[31mred.png' -> 400 (got 400)
ok - filename 'photo\u202egnp.exe' -> 400 (got 400)
ok - filename '..' -> 400 (got 400)
ok - filename '.' -> 400 (got 400)
ok - filename ' ' -> 400 (got 400)
ok - filename 'xxxxxxxxxxxxxxxxxxxx' -> 400 (got 400)
ok - filename missing -> 400 (got 400)
ok - filename of exactly 255 chars -> 202 (got 202)
ok - filename with spaces, Unicode and punctuation -> 202 (got 202)
ok - media type parameters are ignored -> 202 (got 202)
ok - no 500 and no dropped connection among 99 checked responses
91 passed, 0 failed
[exit 0]
+6
View File
@@ -0,0 +1,6 @@
# check
# date: 2026-12-03T00:23:10 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
[exit 0]
+56
View File
@@ -0,0 +1,56 @@
# failover
# date: 2026-12-03T16:51:52 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/resilience.py --mode failover --action-script C:\Users\79152\Desktop\mtusi2026lab7\scripts\stop-one.cmd --base-url https://localhost:8443 --ca-file C:\Users\79152\Desktop\mtusi2026lab7\secrets\ca.crt
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 108, "failed_attempts": 0, "first_recovery_seconds": 2.199}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
[exit 0]
$ C:\Users\79152\Desktop\mtusi2026lab7\scripts\restore-api.cmd
Container mtusi-lab7-openbao-1 Waiting
Container mtusi-lab7-postgres-1 Waiting
Container mtusi-lab7-postgres-1 Healthy
Container mtusi-lab7-openbao-1 Healthy
Container mtusi-lab7-migrate-1 Starting
Container mtusi-lab7-migrate-1 Started
Container mtusi-lab7-broker-1 Waiting
Container mtusi-lab7-openbao-1 Waiting
Container mtusi-lab7-migrate-1 Waiting
Container mtusi-lab7-postgres-1 Waiting
Container mtusi-lab7-redis-1 Waiting
Container mtusi-lab7-broker-1 Healthy
Container mtusi-lab7-postgres-1 Healthy
Container mtusi-lab7-redis-1 Healthy
Container mtusi-lab7-openbao-1 Healthy
Container mtusi-lab7-migrate-1 Exited
Container mtusi-lab7-api-2 Starting
Container mtusi-lab7-api-2 Started
[exit 0]
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/resilience.py --mode failover --action-script C:\Users\79152\Desktop\mtusi2026lab7\scripts\stop-one.cmd --base-url https://localhost:8443 --ca-file C:\Users\79152\Desktop\mtusi2026lab7\secrets\ca.crt
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 111, "failed_attempts": 0, "first_recovery_seconds": 2.228}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
[exit 0]
$ C:\Users\79152\Desktop\mtusi2026lab7\scripts\restore-api.cmd
Container mtusi-lab7-openbao-1 Waiting
Container mtusi-lab7-postgres-1 Waiting
Container mtusi-lab7-openbao-1 Healthy
Container mtusi-lab7-postgres-1 Healthy
Container mtusi-lab7-migrate-1 Starting
Container mtusi-lab7-migrate-1 Started
Container mtusi-lab7-postgres-1 Waiting
Container mtusi-lab7-redis-1 Waiting
Container mtusi-lab7-broker-1 Waiting
Container mtusi-lab7-openbao-1 Waiting
Container mtusi-lab7-migrate-1 Waiting
Container mtusi-lab7-postgres-1 Healthy
Container mtusi-lab7-redis-1 Healthy
Container mtusi-lab7-openbao-1 Healthy
Container mtusi-lab7-broker-1 Healthy
Container mtusi-lab7-migrate-1 Exited
Container mtusi-lab7-api-2 Starting
Container mtusi-lab7-api-2 Started
[exit 0]
+17
View File
@@ -0,0 +1,17 @@
# jobs-broker-down
# date: 2026-12-03T00:25:59 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/jobs.py --base-url https://localhost:8443 --scenario broker-down
== брокер недоступен: приём не зависит от брокера (transactional outbox) ==
ok - /health/ready = 200: broker is not critical for API
ok - upload → 202 queued while broker is down (0.1s, publish timeout ≤ 2s)
ok - intent kept in outbox, not published yet
ok - after broker is back: status ready, error_code null
ok - after broker is back: variants thumbnail+crop+optimized (['thumbnail', 'crop', 'optimized'])
ok - after broker is back: original byte-for-byte
ok - after broker is back: thumbnail 256x160, sha256 matches
ok - relay published the outbox row when broker came back
[broker-down: 10s]
8 passed, 0 failed
[exit 0]
+15
View File
@@ -0,0 +1,15 @@
# jobs-crash-ack
# date: 2026-12-03T00:26:34 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/jobs.py --base-url https://localhost:8443 --scenario crash-ack
== crash после COMMIT ready, до ack ==
ok - commit before crash: status ready, error_code null
ok - commit before crash: variants thumbnail+crop+optimized (['thumbnail', 'crop', 'optimized'])
ok - commit before crash: original byte-for-byte
ok - commit before crash: thumbnail 256x160, sha256 matches
ok - unacked message redelivered after restart and acked as no-op
ok - ready recorded once, 3 variants
[crash-ack: 28s]
6 passed, 0 failed
[exit 0]
+15
View File
@@ -0,0 +1,15 @@
# jobs-redelivery
# date: 2026-12-03T00:26:09 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/jobs.py --base-url https://localhost:8443 --scenario redelivery
== повторная доставка уже ready-задачи ==
published duplicate: 1796253978409-0 {"schema_version": 1, "job_id": "22d1f07d-a118-4d98-8e87-ad8acb323053", "type": "at
published duplicate: 1796253982127-0 {"schema_version": 1, "job_id": "22d1f07d-a118-4d98-8e87-ad8acb323053", "type": "at
ok - duplicates: status stays ready, variants unchanged (same sha256)
ok - no second set of variants: rows=3, S3 objects=3
ok - job finished exactly once, attempt unchanged
ok - duplicates acked (no pending messages)
[redelivery: 24s]
4 passed, 0 failed
[exit 0]
+19
View File
@@ -0,0 +1,19 @@
# jobs-registry
# date: 2026-12-03T00:29:14 commit: cbbe525
$ docker compose --env-file .env exec -T worker python -m app.replay --list
failed jobs: 0
[exit 0]
$ docker compose --env-file .env exec -T worker python -m app.replay --dlq
1796254126700-0 {"job": "{\"attachment_id\":\"c77ba66f-95d6-477f-8b99-845b2ba9578d\",\"job_id\":\"7cb09627-2683-46ed-8e28-506b56cd339d\"}", "reason": "retry_exhausted (injected_transient)", "source_id": "1796254126662-0", "at": "2026-12-02T23:28:46.700642Z"}
[exit 0]
$ docker compose --env-file .env exec -T worker python -m app.tools queue
{"stream_length": 0, "groups": [{"name": "workers", "consumers": 4, "pending": 0, "lag": 0}], "dlq_length": 1, "outbox_unpublished": 0, "jobs_by_status": {"ready": 25}}
[exit 0]
$ docker compose --env-file .env --profile fault stop api-fault worker-fault
Container mtusi-lab7-worker-fault-1 Stopping
Container mtusi-lab7-worker-fault-1 Stopped
[exit 0]
+22
View File
@@ -0,0 +1,22 @@
# jobs-retry-replay
# date: 2026-12-03T00:27:02 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/jobs.py --base-url https://localhost:8443 --scenario retry-replay
== временные ошибки → backoff+jitter → failed → replay ==
ok - after 23s: failed, error_code=retry_exhausted
ok - bounded: 5 attempts, 4 scheduled retries, delays [0.8, 1.2, 3.8, 6.3]
ok - backoff grows 2^n with jitter in [d/2, d] (JOB_BACKOFF_BASE_SECONDS=1)
ok - content of failed → 409 (got 409)
ok - failed attachment cannot be attached → 409 (got 409)
ok - failed job is in the registry (python -m app.replay --list)
ok - explicit replay accepted
ok - after replay: status ready, error_code null
ok - after replay: variants thumbnail+crop+optimized (['thumbnail', 'crop', 'optimized'])
ok - after replay: original byte-for-byte
ok - after replay: thumbnail 256x160, sha256 matches
ok - same job_id, attempt 6, replays=1 (audit)
ok - replay of a ready job is refused (no duplicate execution)
[retry-replay: 131s]
13 passed, 0 failed
[exit 0]
+26
View File
@@ -0,0 +1,26 @@
# jobs-worker-down
# date: 2026-12-03T00:25:23 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/jobs.py --base-url https://localhost:8443 --scenario worker-down
== worker остановлен: приём не зависит от обработки ==
ok - upload → 202 queued without worker (0.06s)
ok - still queued after 3 s: API did not resize synchronously
ok - content of queued attachment → 409 (got 409)
ok - thumbnail of queued attachment → 409 (got 409)
ok - message with queued attachment → 201 (got 201)
ok - other messages keep working
ok - job is in the broker stream (len=1), outbox published
== рестарт брокера и API с сохранением volumes ==
ok - after broker restart the message is still there (len=1)
ok - same session, same attachment, still queued
== worker запущен ==
ok - after restart: status ready, error_code null
ok - after restart: variants thumbnail+crop+optimized (['thumbnail', 'crop', 'optimized'])
ok - after restart: original byte-for-byte
ok - after restart: thumbnail 256x160, sha256 matches
ok - staging removed after ready (original lives in originals/)
attachment 6aa5c5be-15a2-415a-94b1-fad82336be4d, job 8acaba04-3508-4e29-a7c1-3588390ff9ee, events: ['23:25:26.464 accepted 1 api', '23:25:51.164 claimed 1 41fdf4c607ce-1', '23:25:52.695 ready 1 41fdf4c607ce']
[worker-down: 35s]
14 passed, 0 failed
[exit 0]
+17
View File
@@ -0,0 +1,17 @@
{
"lab": 7,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.124,
"concurrency": 8,
"successful_requests": 4442,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 73.881,
"successful_latency_ms": {
"p50": 95.356,
"p95": 287.379,
"p99": 519.151
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+63
View File
@@ -0,0 +1,63 @@
# load
# date: 2026-12-03T00:29:40 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/load.py --base-url https://localhost:8443 --ca-file C:\Users\79152\Desktop\mtusi2026lab7\secrets\ca.crt --duration 60 --concurrency 8 --output evidence/load.json
{
"lab": 7,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 60.0,
"elapsed_seconds": 60.124,
"concurrency": 8,
"successful_requests": 4442,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 73.881,
"successful_latency_ms": {
"p50": 95.356,
"p95": 287.379,
"p99": 519.151
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
[exit 0]
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/snapshot.py --minutes 2
Окно: последние 2 мин
API RPS (все реплики) 39.64 req/s sum(rate(http_server_request_duration_seconds_count[2m]))
API доля 5xx 0.00 % (sum(rate(http_server_request_duration_seconds_count{http_response_status_code=~"5.."}[2m])) or vector(0)) / sum(rate(http_server_request_duration_seconds_count[2m]))
API p50 70 ms histogram_quantile(0.50, sum by (le) (rate(http_server_request_duration_seconds_bucket[2m])))
API p95 244 ms histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket[2m])))
API p99 481 ms histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket[2m])))
Доступность за 1h (SLO ≥ 99 %) 100.00 % 1 - messenger:http_errors:ratio1h
Jobs ready 0 sum(increase(messenger_jobs_processed_total{outcome="ready"}[2m]))
Jobs retry 0 sum(increase(messenger_jobs_processed_total{outcome="retry"}[2m]))
Jobs failed 0 sum(increase(messenger_jobs_processed_total{outcome="failed"}[2m]))
Job duration p95 (ready) нет данных histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_seconds_bucket{outcome="ready"}[2m])))
Upload → ready p50 нет данных histogram_quantile(0.50, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[2m])))
Upload → ready p95 нет данных histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[2m])))
Очередь: queued сейчас 0 max(messenger_queue_depth{state="queued"})
Очередь: oldest age max за окно 33.09 s max_over_time(messenger:queue_oldest_age_seconds:max[2m])
DB pool used max за окно 6 max(max_over_time(messenger_db_pool_connections{state="used"}[2m]))
DB pool waiting max за окно 0 max(max_over_time(messenger_db_pool_waiting[2m]))
Worker утилизация max за окно 0.00 % max_over_time((sum(messenger_worker_busy) / sum(messenger_worker_capacity))[2m:15s])
CPU API (ядра, сумма реплик) 0.47 sum(rate(process_cpu_time_seconds_total{job="messenger-api"}[2m]))
CPU worker (ядра) 0.00 sum(rate(process_cpu_time_seconds_total{job="messenger-worker"}[2m]))
RSS API max 166 MiB max(process_memory_usage_bytes{job="messenger-api"})
RSS worker max 105 MiB max(process_memory_usage_bytes{job="messenger-worker"})
RSS Collector 219 MiB max(otelcol_process_memory_rss{job="otel-collector"})
Collector: spans отправлено 25462 sum(increase(otelcol_exporter_sent_spans_total[2m]))
Collector: логов отправлено 5094 sum(increase(otelcol_exporter_sent_log_records_total[2m]))
Collector: потеряно (send_failed) 0 sum(increase({__name__=~"otelcol_exporter_send_failed_.+"}[2m]))
Серий метрик приложения 460 count({__name__=~"messenger_.+|http_server_.+"})
Alerts:
ApiHighErrorRate inactive health=ok for=60s
ApiErrorBudgetBurnFast inactive health=ok for=120s
ApiLatencyP95High inactive health=ok for=300s
AttachmentQueueLagGrowing inactive health=ok for=30s
AttachmentJobsFailing inactive health=ok for=0s
TimeToReadySloBreach inactive health=ok for=300s
TelemetryExportFailing inactive health=ok for=60s
OtelCollectorDown inactive health=ok for=60s
[exit 0]
+43
View File
@@ -0,0 +1,43 @@
# metrics-snapshot
# date: 2026-12-03T00:35:15 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/snapshot.py --minutes 30
Окно: последние 30 мин
API RPS (все реплики) 4.71 req/s sum(rate(http_server_request_duration_seconds_count[30m]))
API доля 5xx 0.00 % (sum(rate(http_server_request_duration_seconds_count{http_response_status_code=~"5.."}[30m])) or vector(0)) / sum(rate(http_server_request_duration_seconds_count[30m]))
API p50 21 ms histogram_quantile(0.50, sum by (le) (rate(http_server_request_duration_seconds_bucket[30m])))
API p95 230 ms histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket[30m])))
API p99 615 ms histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket[30m])))
Доступность за 1h (SLO ≥ 99 %) 100.00 % 1 - messenger:http_errors:ratio1h
Jobs ready 23.46 sum(increase(messenger_jobs_processed_total{outcome="ready"}[30m]))
Jobs retry 1.20 sum(increase(messenger_jobs_processed_total{outcome="retry"}[30m]))
Jobs failed 0 sum(increase(messenger_jobs_processed_total{outcome="failed"}[30m]))
Job duration p95 (ready) 4.71 s histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_seconds_bucket{outcome="ready"}[30m])))
Upload → ready p50 7.08 s histogram_quantile(0.50, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[30m])))
Upload → ready p95 26.17 s histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[30m])))
Очередь: queued сейчас 0 max(messenger_queue_depth{state="queued"})
Очередь: oldest age max за окно 33.09 s max_over_time(messenger:queue_oldest_age_seconds:max[30m])
DB pool used max за окно 8 max(max_over_time(messenger_db_pool_connections{state="used"}[30m]))
DB pool waiting max за окно 0 max(max_over_time(messenger_db_pool_waiting[30m]))
Worker утилизация max за окно 100.00 % max_over_time((sum(messenger_worker_busy) / sum(messenger_worker_capacity))[30m:15s])
CPU API (ядра, сумма реплик) 0.07 sum(rate(process_cpu_time_seconds_total{job="messenger-api"}[30m]))
CPU worker (ядра) 0.01 sum(rate(process_cpu_time_seconds_total{job="messenger-worker"}[30m]))
RSS API max 148 MiB max(process_memory_usage_bytes{job="messenger-api"})
RSS worker max 106 MiB max(process_memory_usage_bytes{job="messenger-worker"})
RSS Collector 220 MiB max(otelcol_process_memory_rss{job="otel-collector"})
Collector: spans отправлено 41403 sum(increase(otelcol_exporter_sent_spans_total[30m]))
Collector: логов отправлено 9003 sum(increase(otelcol_exporter_sent_log_records_total[30m]))
Collector: потеряно (send_failed) 0 sum(increase({__name__=~"otelcol_exporter_send_failed_.+"}[30m]))
Серий метрик приложения 415 count({__name__=~"messenger_.+|http_server_.+"})
Alerts:
ApiHighErrorRate inactive health=ok for=60s
ApiErrorBudgetBurnFast inactive health=ok for=120s
ApiLatencyP95High inactive health=ok for=300s
AttachmentQueueLagGrowing inactive health=ok for=30s
AttachmentJobsFailing inactive health=ok for=0s
TimeToReadySloBreach inactive health=ok for=300s
TelemetryExportFailing inactive health=ok for=60s
OtelCollectorDown inactive health=ok for=60s
[exit 0]
+14
View File
@@ -0,0 +1,14 @@
# no-local-file
# date: 2026-12-03T00:30:58 commit: cbbe525
$ docker compose --env-file .env exec -T --index 1 api python -m app.tools find-local 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
{"files_scanned": 68, "copies_found": []}
[exit 0]
$ docker compose --env-file .env exec -T --index 2 api python -m app.tools find-local 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
{"files_scanned": 68, "copies_found": []}
[exit 0]
$ docker compose --env-file .env exec -T worker python -m app.tools find-local 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
{"files_scanned": 69, "copies_found": []}
[exit 0]
+66
View File
@@ -0,0 +1,66 @@
# observability
# date: 2026-12-03T15:52:36 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/observability.py --base-url https://localhost:8443
== контролируемый запрос: trace и лог API ==
ok - POST message с traceparent → 201 (trace_id 1ae3d87a08721a93694e2434225a0e5f)
ok - Tempo: server span messenger-api найден (5 spans)
ok - server span: http.route = шаблон (/api/v1/chats/{chat_id}/messages)
ok - server span: status_code 201
ok - server span: messenger.request.id = X-Request-Id (320416f3-e160-4f7a-a69b-d9ea52bd580b)
ok - resource: service.version=lab6 instance=6460ef39fa5f env=lab
ok - trace запроса содержит DB spans (psycopg)
ok - Loki: лог API с тем же trace_id (1 записей)
ok - лог: request.id = X-Request-Id ответа
ok - лог: span_id=6a7f43a09866f9db, severity=INFO, service_name=messenger-api
== upload: producer → consumer → S3/DB в одном trace ==
ok - upload с traceparent → 202 (trace_id cbdacab0546872a165574b7ef21402f8)
ok - attachment → ready
ok - producer span «send attachments:jobs» в API
ok - consumer span «process attachments:jobs» в worker
ok - consumer.parent = producer span (W3C traceparent через сообщение broker)
ok - consumer: outcome=ready
ok - worker → S3 spans: ['S3.CopyObject', 'S3.DeleteObject', 'S3.GetObject', 'S3.PutObject']
ok - worker → DB spans: 19
ok - worker: span image.render
цепочка: api:POST /api/v1/chats/{chat_id}/attachments → api:send attachments:jobs → worker:process attachments:jobs → worker:image.render
ok - Loki: лог worker job.ready с тем же trace_id (2 записей)
== retry: все попытки задачи в одном trace ==
SKIP: trace с retry не найден — сначала jobs.py --scenario retry-replay (профиль fault)
== метрики контракта в Prometheus ==
ok - http_server_request_duration_seconds_bucket: 1590 серий, job=['messenger-api']
ok - messenger_jobs_processed_total: 2 серий, job=['messenger-worker']
ok - messenger_job_duration_seconds_bucket: 28 серий, job=['messenger-worker']
ok - messenger_attachment_time_to_ready_seconds_bucket: 30 серий, job=['messenger-worker']
ok - messenger_queue_depth: 15 серий, job=['messenger-api']
ok - messenger_queue_oldest_age_seconds: 5 серий, job=['messenger-api']
ok - messenger_db_pool_connections: 14 серий, job=['messenger-api', 'messenger-worker']
ok - messenger_db_pool_waiting: 7 серий, job=['messenger-api', 'messenger-worker']
ok - messenger_db_pool_max: 7 серий, job=['messenger-api', 'messenger-worker']
ok - messenger_worker_busy: 2 серий, job=['messenger-worker']
ok - messenger_worker_capacity: 2 серий, job=['messenger-worker']
ok - process_cpu_time_seconds_total: 14 серий, job=['messenger-api', 'messenger-worker']
ok - process_memory_usage_bytes: 7 серий, job=['messenger-api', 'messenger-worker']
ok - http_route — только шаблоны (10 значений, UUID нет)
ok - p95 считается из buckets (histogram_quantile по sum by le)
ok - buckets HTTP в секундах: 0.005 … 10.0
ok - target_info (resource) для ['messenger-api', 'messenger-worker']
== кардинальность и утечки ==
ok - нет запрещённых labels у метрик приложения (ok)
ok - кардинальность ограничена: ≤ 507 серий на процесс, 35 комбинаций route×method×code
ok - Loki: пароль не найден в логах
ok - Loki: Bearer token не найден в логах
ok - Loki: текст сообщения не найден в логах
ok - Tempo: в атрибутах spans нет пароля/токена/текста/signed URL []
ok - db.statement — с плейсхолдерами %s, без значений (4 запросов)
== provisioning ==
ok - alert rule ApiHighErrorRate загружен (inactive, for=60s)
ok - alert rule AttachmentQueueLagGrowing загружен (inactive, for=30s)
ok - Grafana datasource prom: Successfully queried the Prometheus API.
ok - Grafana datasource loki: Data source successfully connected.
ok - Grafana datasource tempo: health API не реализован плагином; поиск через datasource (mTLS) → 200, трасс: 1
ok - dashboard «Messenger — lab6» из provisioning: 21 панелей, provisioned=True
[observability: 29s]
50 passed, 0 failed
[exit 0]
+45
View File
@@ -0,0 +1,45 @@
# persistence
# date: 2026-12-03T16:51:35 commit: cbbe525
$ docker compose --env-file .env ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi-lab7-api-1 mtusi-messenger:lab7 "python -m app" api 52 minutes ago Up 52 minutes (healthy) 8443/tcp
mtusi-lab7-api-2 mtusi-messenger:lab7 "python -m app" api 52 minutes ago Up 52 minutes (healthy) 8443/tcp
mtusi-lab7-broker-1 redis:8.6.8 "docker-entrypoint.s…" broker 17 hours ago Up 16 hours (healthy) 6379/tcp
mtusi-lab7-grafana-1 grafana/grafana:11.4.0 "/bin/sh -c 'export …" grafana 17 hours ago Up 17 hours 127.0.0.1:3000->3000/tcp
mtusi-lab7-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb 17 hours ago Up 55 seconds (healthy) 127.0.0.1:8443-8445->8443-8445/tcp
mtusi-lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki 17 hours ago Up 17 hours 3100/tcp
mtusi-lab7-openbao-1 openbao/openbao:2.6.4 "bao server -config=…" openbao 17 hours ago Up 16 hours (healthy) 8200/tcp
mtusi-lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.111.0 "/otelcol-contrib --…" otel-collector 17 hours ago Up 17 hours
mtusi-lab7-otel-gw-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" otel-gw 17 hours ago Up 17 hours (healthy)
mtusi-lab7-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 17 hours ago Up 16 hours (healthy) 5432/tcp
mtusi-lab7-prometheus-1 prom/prometheus:v2.55.1 "/bin/prometheus --c…" prometheus 17 hours ago Up 17 hours (healthy) 9090/tcp
mtusi-lab7-redis-1 redis:8.6.8 "docker-entrypoint.s…" redis 17 hours ago Up 16 hours (healthy) 6379/tcp
mtusi-lab7-s3-1 pgsty/minio:RELEASE.2026-08-04T00-00-00Z "/usr/bin/docker-ent…" s3 17 hours ago Up 16 hours (healthy) 9000/tcp
mtusi-lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo 17 hours ago Up 16 hours
mtusi-lab7-worker-1 mtusi-messenger:lab7 "python -m app.worker" worker 52 minutes ago Up 52 minutes (healthy) 8443/tcp
[exit 0]
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/resilience.py --mode persistence --action-script C:\Users\79152\Desktop\mtusi2026lab7\scripts\restart.cmd --base-url https://localhost:8443 --ca-file C:\Users\79152\Desktop\mtusi2026lab7\secrets\ca.crt
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
[exit 0]
$ docker compose --env-file .env ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi-lab7-api-1 mtusi-messenger:lab7 "python -m app" api 53 minutes ago Up 5 seconds (health: starting) 8443/tcp
mtusi-lab7-api-2 mtusi-messenger:lab7 "python -m app" api 53 minutes ago Up 5 seconds (health: starting) 8443/tcp
mtusi-lab7-broker-1 redis:8.6.8 "docker-entrypoint.s…" broker 17 hours ago Up 7 seconds (health: starting) 6379/tcp
mtusi-lab7-grafana-1 grafana/grafana:11.4.0 "/bin/sh -c 'export …" grafana 17 hours ago Up 17 hours 127.0.0.1:3000->3000/tcp
mtusi-lab7-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb 17 hours ago Up 6 seconds (health: starting) 127.0.0.1:8443-8445->8443-8445/tcp
mtusi-lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki 17 hours ago Up 17 hours 3100/tcp
mtusi-lab7-openbao-1 openbao/openbao:2.6.4 "bao server -config=…" openbao 17 hours ago Up 12 seconds (healthy) 8200/tcp
mtusi-lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.111.0 "/otelcol-contrib --…" otel-collector 17 hours ago Up 17 hours
mtusi-lab7-otel-gw-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" otel-gw 17 hours ago Up 17 hours (healthy)
mtusi-lab7-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 17 hours ago Up 7 seconds (health: starting) 5432/tcp
mtusi-lab7-prometheus-1 prom/prometheus:v2.55.1 "/bin/prometheus --c…" prometheus 17 hours ago Up 17 hours (healthy) 9090/tcp
mtusi-lab7-redis-1 redis:8.6.8 "docker-entrypoint.s…" redis 17 hours ago Up 8 seconds (healthy) 6379/tcp
mtusi-lab7-s3-1 pgsty/minio:RELEASE.2026-08-04T00-00-00Z "/usr/bin/docker-ent…" s3 17 hours ago Up 8 seconds (healthy) 9000/tcp
mtusi-lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo 17 hours ago Up 16 hours
mtusi-lab7-worker-1 mtusi-messenger:lab7 "python -m app.worker" worker 53 minutes ago Up 6 seconds (health: starting) 8443/tcp
[exit 0]
+18
View File
@@ -0,0 +1,18 @@
# ports
# date: 2026-12-03T00:24:32 commit: cbbe525
127.0.0.1:5432 closed (TimeoutError) ok
127.0.0.1:6379 closed (TimeoutError) ok
127.0.0.1:9000 closed (TimeoutError) ok
127.0.0.1:9001 closed (TimeoutError) ok
127.0.0.1:8200 closed (TimeoutError) ok
127.0.0.1:8201 closed (TimeoutError) ok
127.0.0.1:4317 closed (TimeoutError) ok
127.0.0.1:4318 closed (TimeoutError) ok
127.0.0.1:8888 closed (TimeoutError) ok
127.0.0.1:13133 closed (TimeoutError) ok
127.0.0.1:9090 closed (TimeoutError) ok
127.0.0.1:3100 closed (TimeoutError) ok
127.0.0.1:3200 closed (TimeoutError) ok
127.0.0.1:8081 closed (TimeoutError) ok
127.0.0.1:8404 closed (TimeoutError) ok
127.0.0.1:8080 closed (TimeoutError) ok
+7
View File
@@ -0,0 +1,7 @@
# queue-drain
# date: 2026-12-03T00:31:05 commit: cbbe525
queue drained in 1.6 s: {'ready': 26}
$ docker compose --env-file .env exec -T worker python -m app.tools queue
{"stream_length": 0, "groups": [{"name": "workers", "consumers": 4, "pending": 0, "lag": 0}], "dlq_length": 1, "outbox_unpublished": 0, "jobs_by_status": {"ready": 26}}
[exit 0]
+87
View File
@@ -0,0 +1,87 @@
# rotation
# date: 2026-12-03T00:31:08 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/rotation.py --base-url https://localhost:8443
== Ротация пароля БД роли api под нагрузкой
kv/messenger/api: version 2 (current + previous password)
ALTER ROLE api: old password no longer accepted for NEW connections
api picks up version 2 within SECRETS_REFRESH_SECONDS; open connections keep working
ok - API подхватил новую версию секретов: ['secrets version 1 -> 2', 'secrets version 1 -> 2']
ok - под нагрузкой во время ротации: {201: 318, 200: 319}
ok rotation в KV есть текущий и предыдущий пароль -> yes
ok rotation новое соединение с ТЕКУЩИМ паролем -> OK:api
ok rotation новое соединение с ПРЕДЫДУЩИМ паролем -> password authentication failed for user "api"
ok - прежний пароль отклоняется для новых соединений, текущий принимается
ok - после рестарта API (только новый пароль, образ тот же): {200: 62, 201: 63}
[db-password: 71s]
== Ротация leaf-сертификата lb и отзыв прежнего
issued lb: serial 28e9b2f37c486e379fc949b3395d06be16ce8083, expires 2027-03-02
ok - трафик через LB после reload с новым сертификатом: {201: 54, 200: 53}
revoked lb serial 5e4750312ca6226a75e26ae95c920569649c1ccf; CRL now has 1 entries
ok lb→api 172.25.0.2 identity lb (разрешена) -> 200
ok lb→api 172.25.0.2 отозванный lb 5e4750312c… -> closed by server
ok lb→api 172.25.0.3 identity lb (разрешена) -> 200
ok lb→api 172.25.0.3 отозванный lb 5e4750312c… -> closed by server
ok - API отвергает новое соединение с ОТОЗВАННЫМ прежним сертификатом lb
ok - вся матрица LB → API после ротации: разрешён только действующий lb
ok - трафик через LB после отзыва прежнего сертификата: {200: 106, 201: 103}
[cert: 24s]
== Отзыв токенов OpenBao приложения
ok - оператор отозвал все токены, выданные cert auth
ok - API вошёл заново сертификатом (2 входов), неудачных чтений: 0
ok - запросы во время отзыва: {200: 363, 201: 364}
[token: 48s]
== OpenBao sealed: работающие реплики живут на кэше, новые не стартуют
ok - 35 c при sealed OpenBao: {200: 285, 201: 287} (секреты из кэша процесса)
ok - обновление секретов падает и это видно в логах: 6 событий
ok - перезапущенная реплика без OpenBao не готова: unhealthy running 0
ok - LB ведёт трафик на живую реплику: {200: 368, 201: 370}
ok - после unseal реплика поднялась сама за 12 c (OpenBao был sealed 86 c)
ok - запросы во время восстановления: {200: 111, 201: 107}
[sealed: 101s]
17 passed, 0 failed
[exit 0]
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lab7.py status
Container mtusi-lab7-pki-run-32d645f6c0c5 Creating
Container mtusi-lab7-pki-run-32d645f6c0c5 Created
lb 28e9b2f37c486e379fc949b3395d06be16ce8083 until 2027-03-02 active (issued 2)
api 50cce6049ba35e64bb5b2106b5c133c6a799e95c until 2027-03-02 active (issued 1)
worker 71cff8f134eae425db3b3de0e761ca63103113f5 until 2027-03-02 active (issued 1)
migrate 37276283a32d29fd2406987fd55cbce32b43557 until 2027-03-02 active (issued 1)
postgres 14872f2539375f9b88b385d9b5828b34fb698c3a until 2027-03-02 active (issued 1)
redis 57141d778043a0730d5967bebf87ddc09f6df1d0 until 2027-03-02 active (issued 1)
broker 56e54961655e27efc3c5bbf9fa0c83ca76628b until 2027-03-02 active (issued 1)
s3 522ba07b9c4d349ec1cfda09813f10ae999f63c3 until 2027-03-02 active (issued 1)
openbao 4f460ed62fba96cfb4c074266c9cd3a461017e4 until 2027-03-02 active (issued 1)
otel-gw 293dddb23f7adf8e299850aab7083a1995b6b219 until 2027-03-02 active (issued 1)
otel-collector ff0be38903220da32764b2d17747c09472648a8 until 2027-03-02 active (issued 1)
prometheus 493bc67fbda31cacf600ee5921bd4efdab8aefdd until 2027-03-02 active (issued 1)
loki f6cca83aafed85eadeaf489f3ce9f9ce25a1225 until 2027-03-02 active (issued 1)
tempo 5df32da279361c141f39f304c59f5213f208da04 until 2027-03-02 active (issued 1)
grafana 191436396285f645dc555e1767215446deb495ec until 2027-03-02 active (issued 1)
redis-ops 3ac9ff81abb27e41a08f7fb24648a53e3f4b8a72 until 2027-03-02 active (issued 1)
broker-ops 24c5461ebf37f5ae324ebde46b95a635fe5f82bc until 2027-03-02 active (issued 1)
intruder 6c0ac69b9bf575a3f7c5131d216a262bb893f401 until 2027-03-02 active (issued 1)
revoked serials: 1
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi-lab7-api-1 mtusi-messenger:lab7 "python -m app" api 13 minutes ago Up About a minute (healthy) 8443/tcp
mtusi-lab7-api-2 mtusi-messenger:lab7 "python -m app" api 13 minutes ago Up 3 minutes (healthy) 8443/tcp
mtusi-lab7-broker-1 redis:8.6.8 "docker-entrypoint.s…" broker 15 minutes ago Up 9 minutes (healthy) 6379/tcp
mtusi-lab7-grafana-1 grafana/grafana:11.4.0 "/bin/sh -c 'export …" grafana 13 minutes ago Up 13 minutes 127.0.0.1:3000->3000/tcp
mtusi-lab7-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb 13 minutes ago Up 13 minutes (healthy) 127.0.0.1:8443-8445->8443-8445/tcp
mtusi-lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki 13 minutes ago Up 13 minutes 3100/tcp
mtusi-lab7-openbao-1 openbao/openbao:2.6.4 "bao server -config=…" openbao 29 minutes ago Up 27 minutes (healthy) 8200/tcp
mtusi-lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.111.0 "/otelcol-contrib --…" otel-collector 13 minutes ago Up 13 minutes
mtusi-lab7-otel-gw-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" otel-gw 13 minutes ago Up 13 minutes (healthy)
mtusi-lab7-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 26 minutes ago Up 26 minutes (healthy) 5432/tcp
mtusi-lab7-prometheus-1 prom/prometheus:v2.55.1 "/bin/prometheus --c…" prometheus 13 minutes ago Up 13 minutes (healthy) 9090/tcp
mtusi-lab7-redis-1 redis:8.6.8 "docker-entrypoint.s…" redis 15 minutes ago Up 15 minutes (healthy) 6379/tcp
mtusi-lab7-s3-1 pgsty/minio:RELEASE.2026-08-04T00-00-00Z "/usr/bin/docker-ent…" s3 26 minutes ago Up 26 minutes (healthy) 9000/tcp
mtusi-lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo 13 minutes ago Up 13 minutes
mtusi-lab7-worker-1 mtusi-messenger:lab7 "python -m app.worker" worker 13 minutes ago Up 6 minutes (healthy) 8443/tcp
openbao: {'initialized': True, 'sealed': False, 'version': '2.6.4', 'storage_type': 'raft'}
$ docker compose --env-file C:\Users\79152\Desktop\mtusi2026lab7\.env --profile ops run --rm pki list
$ docker compose --env-file C:\Users\79152\Desktop\mtusi2026lab7\.env ps
[exit 0]
+20
View File
@@ -0,0 +1,20 @@
# s3-private
# date: 2026-12-03T00:25:01 commit: cbbe525
$ docker compose --env-file .env exec -T api python -m app.tools private-check
ok api credentials: PUT staging/ (own prefix) -> 200
ok anonymous GET object -> 403
ok anonymous LIST bucket -> 403
ok anonymous PUT object -> 403
ok api credentials: PUT originals/ (worker prefix) -> AccessDenied
ok api credentials: PUT variants/ (worker prefix) -> AccessDenied
ok api credentials: GET staging/ (only worker reads) -> AccessDenied
ok api credentials: LIST originals/ -> AccessDenied
ok api credentials: ListBuckets (no foreign buckets) -> only messenger-attachments
ok api credentials: CreateBucket -> AccessDenied
ok api credentials: PutBucketPolicy (make public) -> AccessDenied
ok api credentials: DeleteBucket -> AccessDenied
ok api credentials: DELETE staging/ (own prefix) -> 204
13 passed, 0 failed
[exit 0]
+9
View File
@@ -0,0 +1,9 @@
# scan-pip-audit
# date: 2026-12-03T07:42:19 commit: cbbe525
$ docker run --rm --entrypoint sh -v C:\Users\79152\Desktop\mtusi2026lab7\requirements.txt:/tmp/requirements.txt:ro python:3.12.7-slim-bookworm -c pip install -q --root-user-action=ignore pip-audit==2.7.3 >/dev/null && pip-audit -r /tmp/requirements.txt --progress-spinner off; true
[notice] A new release of pip is available: 24.2 -> 26.3
[notice] To update, run: pip install --upgrade pip
No known vulnerabilities found
[exit 0]
+420
View File
@@ -0,0 +1,420 @@
# scan-trivy-app
# date: 2026-12-03T07:43:06 commit: cbbe525
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity HIGH,CRITICAL --no-progress mtusi-messenger:lab7
2026-12-03T06:43:07Z INFO [vuln] Vulnerability scanning is enabled
2026-12-03T06:43:12Z WARN Third-party SBOM may lead to inaccurate vulnerability detection
2026-12-03T06:43:12Z WARN Recommend using Trivy to generate SBOMs
2026-12-03T06:43:12Z WARN [sbom] Ignore the OS package as no OS is detected. file_path="usr/local/lib/python3.12/site-packages/pillow-13.0.0.dist-info/sboms/auditwheel.cdx.json"
2026-12-03T06:43:12Z WARN Third-party SBOM may lead to inaccurate vulnerability detection
2026-12-03T06:43:12Z WARN Recommend using Trivy to generate SBOMs
2026-12-03T06:43:12Z WARN [sbom] Ignore the OS package as no OS is detected. file_path="usr/local/lib/python3.12/site-packages/psycopg_binary-3.3.6.dist-info/sboms/auditwheel.cdx.json"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="boto3" version="1.38.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="botocore" version="1.38.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="certifi" version="2026.11.20"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="h11" version="0.16.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="jmespath" version="1.1.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="python-dateutil" version="2.9.0.post0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="PyYAML" version="6.0.4"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="requests" version="2.34.2"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="s3transfer" version="0.12.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="six" version="1.17.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="uvloop" version="0.23.0"
2026-12-03T06:43:13Z INFO [python] License acquired from METADATA classifiers may be subject to additional terms name="watchfiles" version="1.3.0"
2026-12-03T06:43:13Z INFO Detected OS family="debian" version="12.15"
2026-12-03T06:43:13Z INFO [debian] Detecting vulnerabilities... os_version="12" pkg_num=105
2026-12-03T06:43:13Z INFO Number of language-specific files num=1
2026-12-03T06:43:13Z INFO [python-pkg] Detecting vulnerabilities...
2026-12-03T06:43:13Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
mtusi-messenger:lab7 (debian 12.15)
===================================
Total: 96 (HIGH: 94, CRITICAL: 2)
┌──────────────────┬─────────────────┬──────────┬──────────────┬─────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├──────────────────┼─────────────────┼──────────┼──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ bsdutils │ CVE-2026-53613 │ HIGH │ affected │ 1:2.38.1-5+deb12u3 │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ gzip │ CVE-2026-41992 │ │ fix_deferred │ 1.12-1 │ │ gzip: gzip: Information disclosure via global buffer │
│ │ │ │ │ │ │ overflow in LZH decompression │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-41992 │
├──────────────────┼─────────────────┤ │ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libacl1 │ CVE-2026-54369 │ │ │ 2.3.1-3 │ │ acl: Symlink traversal privilege escalation via libacl │
│ │ │ │ │ │ │ functions │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-54369 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libblkid1 │ CVE-2026-53613 │ │ affected │ 2.38.1-5+deb12u3 │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┤ │ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libgssapi-krb5-2 │ CVE-2026-107364 │ │ │ 1.20.1-2+deb12u5 │ │ krb5: Unauthenticated KDC DoS based on ASN.1 decoder read │
│ │ │ │ │ │ │ overrun │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-107364 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112315 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS in │
│ │ │ │ │ │ │ RPCSEC_GSS buffer decode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112315 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112316 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory leak DoS in │
│ │ │ │ │ │ │ xdr_krb5_tl_data() decode failure... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112316 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112317 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated memory leak DoS in KDB │
│ │ │ │ │ │ │ keytab key... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112317 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112318 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated DoS exploiting │
│ │ │ │ │ │ │ dereference of null policy name... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112318 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112319 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory exhaustion DoS │
│ │ │ │ │ │ │ via unbounded RPC XDR... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112319 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112320 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ GSS-RPC auth flavor... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112320 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112321 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI_INIT error paths... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112321 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112322 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated CPU DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI client states cleanup... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112322 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112323 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory exhaustion via │
│ │ │ │ │ │ │ failed AUTH_GSSAPI_INIT requests │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112323 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-118380 │ │ │ │ │ krb5: kadmind: request alteration and protected information │
│ │ │ │ │ │ │ disclosure │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-118380 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119079 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated CPU DoS via quadratic │
│ │ │ │ │ │ │ ASN.1 SEQUENCE OF... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119079 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71199 │ │ │ │ │ krb5: Alteration of authentication indicators in CAMMAC │
│ │ │ │ │ │ │ container │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71199 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71200 │ │ │ │ │ krb5: Unauthenticated KDC NULL pointer dereference KDC DoS │
│ │ │ │ │ │ │ via crafted PKINIT pre-auth... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71200 │
├──────────────────┼─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ libk5crypto3 │ CVE-2026-107364 │ │ │ │ │ krb5: Unauthenticated KDC DoS based on ASN.1 decoder read │
│ │ │ │ │ │ │ overrun │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-107364 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112315 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS in │
│ │ │ │ │ │ │ RPCSEC_GSS buffer decode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112315 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112316 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory leak DoS in │
│ │ │ │ │ │ │ xdr_krb5_tl_data() decode failure... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112316 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112317 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated memory leak DoS in KDB │
│ │ │ │ │ │ │ keytab key... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112317 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112318 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated DoS exploiting │
│ │ │ │ │ │ │ dereference of null policy name... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112318 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112319 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory exhaustion DoS │
│ │ │ │ │ │ │ via unbounded RPC XDR... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112319 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112320 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ GSS-RPC auth flavor... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112320 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112321 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI_INIT error paths... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112321 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112322 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated CPU DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI client states cleanup... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112322 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112323 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory exhaustion via │
│ │ │ │ │ │ │ failed AUTH_GSSAPI_INIT requests │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112323 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-118380 │ │ │ │ │ krb5: kadmind: request alteration and protected information │
│ │ │ │ │ │ │ disclosure │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-118380 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119079 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated CPU DoS via quadratic │
│ │ │ │ │ │ │ ASN.1 SEQUENCE OF... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119079 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71199 │ │ │ │ │ krb5: Alteration of authentication indicators in CAMMAC │
│ │ │ │ │ │ │ container │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71199 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71200 │ │ │ │ │ krb5: Unauthenticated KDC NULL pointer dereference KDC DoS │
│ │ │ │ │ │ │ via crafted PKINIT pre-auth... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71200 │
├──────────────────┼─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ libkrb5-3 │ CVE-2026-107364 │ │ │ │ │ krb5: Unauthenticated KDC DoS based on ASN.1 decoder read │
│ │ │ │ │ │ │ overrun │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-107364 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112315 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS in │
│ │ │ │ │ │ │ RPCSEC_GSS buffer decode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112315 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112316 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory leak DoS in │
│ │ │ │ │ │ │ xdr_krb5_tl_data() decode failure... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112316 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112317 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated memory leak DoS in KDB │
│ │ │ │ │ │ │ keytab key... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112317 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112318 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated DoS exploiting │
│ │ │ │ │ │ │ dereference of null policy name... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112318 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112319 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory exhaustion DoS │
│ │ │ │ │ │ │ via unbounded RPC XDR... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112319 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112320 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ GSS-RPC auth flavor... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112320 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112321 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI_INIT error paths... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112321 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112322 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated CPU DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI client states cleanup... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112322 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112323 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory exhaustion via │
│ │ │ │ │ │ │ failed AUTH_GSSAPI_INIT requests │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112323 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-118380 │ │ │ │ │ krb5: kadmind: request alteration and protected information │
│ │ │ │ │ │ │ disclosure │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-118380 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119079 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated CPU DoS via quadratic │
│ │ │ │ │ │ │ ASN.1 SEQUENCE OF... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119079 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71199 │ │ │ │ │ krb5: Alteration of authentication indicators in CAMMAC │
│ │ │ │ │ │ │ container │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71199 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71200 │ │ │ │ │ krb5: Unauthenticated KDC NULL pointer dereference KDC DoS │
│ │ │ │ │ │ │ via crafted PKINIT pre-auth... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71200 │
├──────────────────┼─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ libkrb5support0 │ CVE-2026-107364 │ │ │ │ │ krb5: Unauthenticated KDC DoS based on ASN.1 decoder read │
│ │ │ │ │ │ │ overrun │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-107364 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112315 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS in │
│ │ │ │ │ │ │ RPCSEC_GSS buffer decode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112315 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112316 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory leak DoS in │
│ │ │ │ │ │ │ xdr_krb5_tl_data() decode failure... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112316 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112317 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated memory leak DoS in KDB │
│ │ │ │ │ │ │ keytab key... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112317 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112318 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated DoS exploiting │
│ │ │ │ │ │ │ dereference of null policy name... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112318 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112319 │ │ │ │ │ krb5: MIT krb5 kadmind authenticated memory exhaustion DoS │
│ │ │ │ │ │ │ via unbounded RPC XDR... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112319 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112320 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ GSS-RPC auth flavor... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112320 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112321 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory leak DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI_INIT error paths... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112321 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112322 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated CPU DoS via │
│ │ │ │ │ │ │ AUTH_GSSAPI client states cleanup... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112322 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-112323 │ │ │ │ │ krb5: MIT krb5 kadmind unauthenticated memory exhaustion via │
│ │ │ │ │ │ │ failed AUTH_GSSAPI_INIT requests │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-112323 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-118380 │ │ │ │ │ krb5: kadmind: request alteration and protected information │
│ │ │ │ │ │ │ disclosure │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-118380 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119079 │ │ │ │ │ krb5: MIT krb5 KDC unauthenticated CPU DoS via quadratic │
│ │ │ │ │ │ │ ASN.1 SEQUENCE OF... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119079 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71199 │ │ │ │ │ krb5: Alteration of authentication indicators in CAMMAC │
│ │ │ │ │ │ │ container │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71199 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-71200 │ │ │ │ │ krb5: Unauthenticated KDC NULL pointer dereference KDC DoS │
│ │ │ │ │ │ │ via crafted PKINIT pre-auth... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-71200 │
├──────────────────┼─────────────────┤ │ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libmount1 │ CVE-2026-53613 │ │ │ 2.38.1-5+deb12u3 │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┤ │ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libncursesw6 │ CVE-2025-69720 │ │ │ 6.4-4 │ │ ncurses: ncurses: Buffer overflow vulnerability may lead to │
│ │ │ │ │ │ │ arbitrary code execution. │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-69720 │
├──────────────────┼─────────────────┤ │ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsmartcols1 │ CVE-2026-53613 │ │ │ 2.38.1-5+deb12u3 │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┼──────────┤ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsqlite3-0 │ CVE-2025-7458 │ CRITICAL │ │ 3.40.1-2+deb12u2 │ │ sqlite: SQLite integer overflow │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-7458 │
│ ├─────────────────┼──────────┼──────────────┤ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-11822 │ HIGH │ fix_deferred │ │ │ sqlite: SQLite: Arbitrary code execution via crafted FTS5 │
│ │ │ │ │ │ │ full-text search data │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-11822 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-11824 │ │ │ │ │ sqlite: SQLite: Arbitrary code execution and crash via │
│ │ │ │ │ │ │ heap-based buffer overflow in... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-11824 │
│ ├─────────────────┤ ├──────────────┤ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119373 │ │ affected │ │ │ sqlite: sqlite: Denial of service via heap-based buffer │
│ │ │ │ │ │ │ overflow in FTS5 │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119373 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119374 │ │ │ │ │ sqlite: sqlite: Arbitrary code execution via corrupted FTS5 │
│ │ │ │ │ │ │ index │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119374 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-119379 │ │ │ │ │ sqlite: sqlite: Arbitrary code execution via crafted session │
│ │ │ │ │ │ │ changesets │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-119379 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsystemd0 │ CVE-2026-16742 │ │ fix_deferred │ 252.39-1~deb12u2 │ │ systemd: systemd-homed: Local privilege escalation via │
│ │ │ │ │ │ │ missing home-record signature verification │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-16742 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libtinfo6 │ CVE-2025-69720 │ │ affected │ 6.4-4 │ │ ncurses: ncurses: Buffer overflow vulnerability may lead to │
│ │ │ │ │ │ │ arbitrary code execution. │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-69720 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libudev1 │ CVE-2026-16742 │ │ fix_deferred │ 252.39-1~deb12u2 │ │ systemd: systemd-homed: Local privilege escalation via │
│ │ │ │ │ │ │ missing home-record signature verification │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-16742 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libuuid1 │ CVE-2026-53613 │ │ affected │ 2.38.1-5+deb12u3 │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ mount │ CVE-2026-53613 │ │ │ │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┤ │ ├─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ ncurses-base │ CVE-2025-69720 │ │ │ 6.4-4 │ │ ncurses: ncurses: Buffer overflow vulnerability may lead to │
│ │ │ │ │ │ │ arbitrary code execution. │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-69720 │
├──────────────────┤ │ │ │ ├───────────────┤ │
│ ncurses-bin │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ perl-base │ CVE-2026-9538 │ │ fix_deferred │ 5.36.0-7+deb12u4 │ │ perl-Archive-Tar: perl-Archive-Tar: Denial of Service via │
│ │ │ │ │ │ │ crafted tar header with large entry... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-9538 │
├──────────────────┼─────────────────┤ ├──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ util-linux │ CVE-2026-53613 │ │ affected │ 2.38.1-5+deb12u3 │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ util-linux-extra │ CVE-2026-53613 │ │ │ │ │ util-linux: TOCTOU in the mount program via ancestor │
│ │ │ │ │ │ │ directory swap on target... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53613 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-53615 │ │ │ │ │ util-linux: util-linux: Partition metadata compromise via │
│ │ │ │ │ │ │ integer overflow in DOS partition parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-53615 │
│ ├─────────────────┤ │ │ ├───────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-78410 │ │ │ │ │ util-linux: util-linux: restricted bind mounts do not pin │
│ │ │ │ │ │ │ the source, allowing X-mount.owner/group/mode... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-78410 │
├──────────────────┼─────────────────┼──────────┼──────────────┼─────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ zlib1g │ CVE-2023-45853 │ CRITICAL │ will_not_fix │ 1:1.2.13.dfsg-1+deb12u1 │ │ zlib: integer overflow and resultant heap-based buffer │
│ │ │ │ │ │ │ overflow in zipOpenNewFileInZip4_6 │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-45853 │
└──────────────────┴─────────────────┴──────────┴──────────────┴─────────────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘
[exit 0]
+226
View File
@@ -0,0 +1,226 @@
# scan-trivy-infra
# date: 2026-12-03T00:38:16 commit: cbbe525
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity CRITICAL --no-progress postgres:16.4-alpine
2026-12-02T23:38:16Z INFO [vuln] Vulnerability scanning is enabled
2026-12-02T23:38:23Z INFO Detected OS family="alpine" version="3.20.3"
2026-12-02T23:38:23Z INFO [alpine] Detecting vulnerabilities... os_version="3.20" repository="3.20" pkg_num=45
2026-12-02T23:38:23Z INFO Number of language-specific files num=1
2026-12-02T23:38:23Z INFO [gobinary] Detecting vulnerabilities...
2026-12-02T23:38:23Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
2026-12-02T23:38:23Z WARN This OS version is no longer supported by the distribution family="alpine" version="3.20.3"
2026-12-02T23:38:23Z WARN The vulnerability detection may be insufficient because security updates are not provided
postgres:16.4-alpine (alpine 3.20.3)
====================================
Total: 3 (CRITICAL: 3)
┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤
│ libcrypto3 │ CVE-2026-31789 │ CRITICAL │ fixed │ 3.3.2-r1 │ 3.3.7-r0 │ openssl: OpenSSL: Heap buffer overflow on 32-bit systems │
│ │ │ │ │ │ │ from large X.509 certificate... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-31789 │
├────────────┤ │ │ │ │ │ │
│ libssl3 │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
├────────────┼────────────────┤ │ ├───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤
│ libxml2 │ CVE-2024-56171 │ │ │ 2.12.7-r0 │ 2.12.7-r1 │ libxml2: Use-After-Free in libxml2 │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-56171 │
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
usr/local/bin/gosu (gobinary)
=============================
Total: 4 (CRITICAL: 4)
┌─────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────┬────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├─────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ stdlib │ CVE-2023-24538 │ CRITICAL │ fixed │ v1.18.2 │ 1.19.8, 1.20.3 │ golang: html/template: backticks not treated as string │
│ │ │ │ │ │ │ delimiters │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24538 │
│ ├────────────────┤ │ │ ├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ │ CVE-2023-24540 │ │ │ │ 1.19.9, 1.20.4 │ golang: html/template: improper handling of JavaScript │
│ │ │ │ │ │ │ whitespace │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-24540 │
│ ├────────────────┤ │ │ ├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ │ CVE-2024-24790 │ │ │ │ 1.21.11, 1.22.4 │ golang: net/netip: Unexpected behavior from Is methods for │
│ │ │ │ │ │ │ IPv4-mapped IPv6 addresses │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-24790 │
│ ├────────────────┤ │ │ ├──────────────────────────────┼────────────────────────────────────────────────────────────┤
│ │ CVE-2025-68121 │ │ │ │ 1.24.13, 1.25.7, 1.26.0-rc.3 │ crypto/tls: crypto/tls: Incorrect certificate validation │
│ │ │ │ │ │ │ during TLS session resumption │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-68121 │
└─────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────┴────────────────────────────────────────────────────────────┘
[exit 0]
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity CRITICAL --no-progress redis:8.6.8
2026-12-02T23:38:24Z INFO [vuln] Vulnerability scanning is enabled
2026-12-02T23:38:28Z INFO Detected OS family="debian" version="13.8"
2026-12-02T23:38:28Z INFO [debian] Detecting vulnerabilities... os_version="13" pkg_num=78
2026-12-02T23:38:28Z INFO Number of language-specific files num=0
2026-12-02T23:38:28Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
redis:8.6.8 (debian 13.8)
=========================
Total: 0 (CRITICAL: 0)
[exit 0]
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity CRITICAL --no-progress openbao/openbao:2.6.4
2026-12-02T23:38:29Z INFO [vuln] Vulnerability scanning is enabled
2026-12-02T23:38:34Z INFO Detected OS family="alpine" version="3.24.2"
2026-12-02T23:38:34Z WARN This OS version is not on the EOL list family="alpine" version="3.24"
2026-12-02T23:38:34Z INFO [alpine] Detecting vulnerabilities... os_version="3.24" repository="3.24" pkg_num=28
2026-12-02T23:38:34Z INFO Number of language-specific files num=1
2026-12-02T23:38:34Z INFO [gobinary] Detecting vulnerabilities...
2026-12-02T23:38:34Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
openbao/openbao:2.6.4 (alpine 3.24.2)
=====================================
Total: 0 (CRITICAL: 0)
[exit 0]
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity CRITICAL --no-progress haproxy:3.0.5-alpine
2026-12-02T23:38:35Z INFO [vuln] Vulnerability scanning is enabled
2026-12-02T23:38:37Z INFO Detected OS family="alpine" version="3.20.3"
2026-12-02T23:38:37Z INFO [alpine] Detecting vulnerabilities... os_version="3.20" repository="3.20" pkg_num=18
2026-12-02T23:38:37Z INFO Number of language-specific files num=0
2026-12-02T23:38:37Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
2026-12-02T23:38:37Z WARN This OS version is no longer supported by the distribution family="alpine" version="3.20.3"
2026-12-02T23:38:37Z WARN The vulnerability detection may be insufficient because security updates are not provided
haproxy:3.0.5-alpine (alpine 3.20.3)
====================================
Total: 2 (CRITICAL: 2)
┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤
│ libcrypto3 │ CVE-2026-31789 │ CRITICAL │ fixed │ 3.3.2-r0 │ 3.3.7-r0 │ openssl: OpenSSL: Heap buffer overflow on 32-bit systems │
│ │ │ │ │ │ │ from large X.509 certificate... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-31789 │
├────────────┤ │ │ │ │ │ │
│ libssl3 │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
[exit 0]
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity CRITICAL --no-progress pgsty/minio:RELEASE.2026-08-04T00-00-00Z
2026-12-02T23:38:38Z INFO [vuln] Vulnerability scanning is enabled
2026-12-02T23:38:41Z INFO Detected OS family="redhat" version="9.8"
2026-12-02T23:38:41Z INFO [redhat] Detecting RHEL/CentOS vulnerabilities... os_version="9" pkg_num=20
2026-12-02T23:38:41Z INFO Number of language-specific files num=2
2026-12-02T23:38:41Z INFO [gobinary] Detecting vulnerabilities...
2026-12-02T23:38:41Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
pgsty/minio:RELEASE.2026-08-04T00-00-00Z (redhat 9.8)
=====================================================
Total: 0 (CRITICAL: 0)
usr/bin/minio (gobinary)
========================
Total: 3 (CRITICAL: 3)
┌────────────────────────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├────────────────────────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/rabbitmq/amqp091-go │ CVE-2026-77405 │ CRITICAL │ fixed │ v1.10.0 │ 1.13.0 │ github.com/rabbitmq/amqp091-go: RabbitMQ amqp091-go: Missing │
│ │ │ │ │ │ │ Explicit TLS Minimum Version Configuration In URI Parser... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-77405 │
│ ├────────────────┤ │ │ │ ├──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-77408 │ │ │ │ │ github.com/rabbitmq/amqp091-go: RabbitMQ amqp091-go: Silent │
│ │ │ │ │ │ │ Data Truncation and State Corruption via Shortstr Integer... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-77408 │
│ ├────────────────┤ │ │ │ ├──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-77411 │ │ │ │ │ github.com/rabbitmq/amqp091-go: RabbitMQ amqp091-go: │
│ │ │ │ │ │ │ Protocol Desynchronization and Frame Injection via Integer │
│ │ │ │ │ │ │ Overflow in... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-77411 │
└────────────────────────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘
[exit 0]
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v mtusi-trivy-cache:/root/.cache/ aquasec/trivy:0.58.1 image --scanners vuln --severity CRITICAL --no-progress grafana/grafana:11.4.0
2026-12-02T23:38:42Z INFO [vuln] Vulnerability scanning is enabled
2026-12-02T23:38:49Z INFO Detected OS family="alpine" version="3.20.3"
2026-12-02T23:38:49Z INFO [alpine] Detecting vulnerabilities... os_version="3.20" repository="3.20" pkg_num=35
2026-12-02T23:38:49Z INFO Number of language-specific files num=4
2026-12-02T23:38:49Z INFO [gobinary] Detecting vulnerabilities...
2026-12-02T23:38:49Z INFO [node-pkg] Detecting vulnerabilities...
2026-12-02T23:38:49Z WARN Using severities from other vendors for some vulnerabilities. Read https://aquasecurity.github.io/trivy/v0.58/docs/scanner/vulnerability#severity-selection for details.
2026-12-02T23:38:49Z WARN This OS version is no longer supported by the distribution family="alpine" version="3.20.3"
2026-12-02T23:38:49Z WARN The vulnerability detection may be insufficient because security updates are not provided
grafana/grafana:11.4.0 (alpine 3.20.3)
======================================
Total: 2 (CRITICAL: 2)
┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤
│ libcrypto3 │ CVE-2026-31789 │ CRITICAL │ fixed │ 3.3.2-r0 │ 3.3.7-r0 │ openssl: OpenSSL: Heap buffer overflow on 32-bit systems │
│ │ │ │ │ │ │ from large X.509 certificate... │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-31789 │
├────────────┤ │ │ │ │ │ │
│ libssl3 │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
usr/share/grafana/bin/grafana (gobinary)
========================================
Total: 5 (CRITICAL: 5)
┌───────────────────────────────┬─────────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────┬──────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├───────────────────────────────┼─────────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/getkin/kin-openapi │ GHSA-r277-6w6q-xmqw │ CRITICAL │ fixed │ v0.125.0 │ 0.144.0 │ kin-openapi: ValidationHandler.Load() Fail-Open │
│ │ │ │ │ │ │ Authentication Bypass via NoopAuthenticationFunc Default │
│ │ │ │ │ │ │ https://github.com/advisories/GHSA-r277-6w6q-xmqw │
├───────────────────────────────┼─────────────────────┤ │ ├───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/jackc/pgx/v5 │ CVE-2026-33815 │ │ │ v5.5.5 │ 5.9.0 │ github.com/jackc/pgx/v5: github.com/jackc/pgx: Memory-safety │
│ │ │ │ │ │ │ vulnerability │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-33815 │
│ ├─────────────────────┤ │ │ │ ├──────────────────────────────────────────────────────────────┤
│ │ CVE-2026-33816 │ │ │ │ │ github.com/jackc/pgx/v5: github.com/jackc/pgx: Memory-safety │
│ │ │ │ │ │ │ vulnerability │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-33816 │
├───────────────────────────────┼─────────────────────┤ │ ├───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ google.golang.org/grpc │ CVE-2026-33186 │ │ │ v1.66.0 │ 1.79.3 │ google.golang.org/grpc/grpc-go: │
│ │ │ │ │ │ │ google.golang.org/grpc/authz: gRPC-Go: Authorization bypass │
│ │ │ │ │ │ │ due to improper HTTP/2 path validation │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2026-33186 │
├───────────────────────────────┼─────────────────────┤ │ ├───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ stdlib │ CVE-2025-68121 │ │ │ v1.23.1 │ 1.24.13, 1.25.7, 1.26.0-rc.3 │ crypto/tls: crypto/tls: Incorrect certificate validation │
│ │ │ │ │ │ │ during TLS session resumption │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-68121 │
└───────────────────────────────┴─────────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────┴──────────────────────────────────────────────────────────────┘
usr/share/grafana/bin/grafana-cli (gobinary)
============================================
Total: 1 (CRITICAL: 1)
┌─────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────┬──────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├─────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────┤
│ stdlib │ CVE-2025-68121 │ CRITICAL │ fixed │ v1.23.1 │ 1.24.13, 1.25.7, 1.26.0-rc.3 │ crypto/tls: crypto/tls: Incorrect certificate validation │
│ │ │ │ │ │ │ during TLS session resumption │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-68121 │
└─────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────┴──────────────────────────────────────────────────────────┘
usr/share/grafana/bin/grafana-server (gobinary)
===============================================
Total: 1 (CRITICAL: 1)
┌─────────┬────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────┬──────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │
├─────────┼────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────┼──────────────────────────────────────────────────────────┤
│ stdlib │ CVE-2025-68121 │ CRITICAL │ fixed │ v1.23.1 │ 1.24.13, 1.25.7, 1.26.0-rc.3 │ crypto/tls: crypto/tls: Incorrect certificate validation │
│ │ │ │ │ │ │ during TLS session resumption │
│ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2025-68121 │
└─────────┴────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────┴──────────────────────────────────────────────────────────┘
[exit 0]
+81
View File
@@ -0,0 +1,81 @@
# security-neg
# date: 2026-12-03T16:50:58 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/security_neg.py --base-url https://localhost:8443
== ACL: посторонний пользователь и подмена identity
ok - чат A+B, сообщение и вложение созданы
ok - посторонний: метаданные чата → 404 (404, существование не раскрывается)
ok - посторонний: сообщения чата → 404 (404, существование не раскрывается)
ok - посторонний: метаданные вложения → 404 (404, существование не раскрывается)
ok - посторонний: содержимое вложения → 404 (404, существование не раскрывается)
ok - посторонний: thumbnail вложения → 404 (404, существование не раскрывается)
ok - посторонний прикрепляет чужой файл к своему чату → 404
ok - X-User-Id чужого пользователя игнорируется (identity из Bearer)
ok - только X-User-Id без Bearer → 401
ok - поддельный токен → 401
[acl: 2s]
== Сессии: logout и истечение
ok - logout → 204
ok - старый токен после logout → 401
ok - сессия с TTL 2 c: сразу 200, через 3,5 c 401 (истекла)
[session: 18s]
== Общий для реплик лимит входа (Redis): 429 + Retry-After
ok - 5 неверных паролей → [401, 401, 401, 401, 401]
ok - 6-я попытка → 429, Retry-After: 300
ok - попытки обслуживали разные реплики ['461380a2accf', '8e702d1fefc5'] — счётчик общий
ok - даже верный пароль во время блокировки → 429 (подбор не продолжить)
ok - другой аккаунт с того же адреса входит (лимит IP не исчерпан)
[ratelimit: 0s]
== Ограничение размера тела
ok - сообщение 70 KB (лимит 64 KiB) → 413
ok - регистрация с телом 100 KB → 413 (до Argon2id не доходит)
[limits: 0s]
== Argon2id: параметры в хэше и rehash при входе
ok - формат PHC: $argon2id$v=19$m=…,t=…,p=…$соль$хэш (соль и параметры хранятся)
ok - параметры m=19456 KiB, t=2, p=1 (≥ 19 MiB, 2, 1)
ok - соль у каждого хэша своя
ok - вход со старым хэшем (m=8192,t=1) → 201
ok - после входа хэш пересчитан с текущими параметрами (rehash): m=19456,t=2,p=1
ok - вход после rehash работает
[argon2: 3s]
== Бюджет защиты от дорогих входов (Argon2id)
ok - Argon2id m=19456,t=2,p=1: 75.4 мс на хэш (CPU лимит реплики 0,5)
бюджет: 2 одновременных хэша × 2 реплики / 75.4 мс ≈ 53.1 входов/с всего; очередь 8 на реплику, сверх неё — сразу 429
ok - 60 одновременных входов: {401: 30, 429: 30}; p95 2075 мс (лишние отклонены сразу, без очереди)
ok - остальной API во время всплеска: GET /users/me медиана 28 мс
[dos: 10s]
== Порты, hardening контейнеров, секреты в образе, изоляция сетей
ok - опубликовано только: 127.0.0.1:3000, 127.0.0.1:8443, 127.0.0.1:8444, 127.0.0.1:8445
service user ro nnp drop add mem
api appuser T T T 256 MiB
api appuser T T T 256 MiB
broker 999:999 T T T 256 MiB
grafana 472 T T T 384 MiB
lb haproxy T T T 128 MiB
loki 10001 T T T 512 MiB
openbao openbao T T T 256 MiB
otel-collector 10001 T T T 256 MiB
otel-gw haproxy T T T 64 MiB
postgres 70:70 T T T 512 MiB
prometheus nobody T T T 512 MiB
redis 999:999 T T T 96 MiB
s3 root T T T 512 MiB
tempo 10001:10001 T T T 512 MiB
worker appuser T T T 1024 MiB
ok - нет privileged-контейнеров
ok - нет network_mode: host
ok - Docker socket не смонтирован ни в один контейнер
ok - no-new-privileges и cap_drop ALL — у всех
ok - корневая ФС только для чтения — у всех долгоживущих
ok - у всех задан лимит памяти
ok - api/worker — не root (appuser)
root (без capabilities, ФС read-only): s3
ok - в ENV образа нет паролей/ключей/токенов (переменные: PATH, LANG, GPG_KEY, PYTHON_VERSION, PYTHON_SHA256, PYTHONDONTWRITEBYTECODE, PYTHONUNBUFFERED, APP_HOST, APP_PORT, HEALTH_PORT, SHUTDOWN_TIMEOUT; подозрительные: нет)
ok - в образе нет ключей/сертификатов/.env (публичные корневые CA /etc/ssl/certs не в счёт)
ok - api не видит хранилища telemetry и Grafana: {'loki': 'gaierror', 'prometheus': 'gaierror', 'grafana': 'gaierror'}
ok - api видит только нужное: openbao, postgres
ok - worker не видит LB/внешний вход: lb gaierror
[docker: 2s]
42 passed, 0 failed
[exit 0]
+6
View File
@@ -0,0 +1,6 @@
# security
# date: 2026-12-03T00:23:16 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/security.py --base-url https://localhost:8443 --ca-file C:\Users\79152\Desktop\mtusi2026lab7\secrets\ca.crt
PASS: trusted HTTPS works; untrusted CA rejected. This does NOT verify internal mTLS, OpenBao or hardening.
[exit 0]
+6
View File
@@ -0,0 +1,6 @@
# smoke
# date: 2026-12-03T16:50:55 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe tests/smoke.py --base-url https://localhost:8443 --ca-file C:\Users\79152\Desktop\mtusi2026lab7\secrets\ca.crt
PASS: lab7 public API scenario; infrastructure and grading evidence remain separate.
[exit 0]
+83
View File
@@ -0,0 +1,83 @@
# stand
# date: 2026-12-03T00:23:10 commit: cbbe525
$ docker compose --env-file .env ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi-lab7-api-1 mtusi-messenger:lab7 "python -m app" api About a minute ago Up About a minute (healthy) 8443/tcp
mtusi-lab7-api-2 mtusi-messenger:lab7 "python -m app" api About a minute ago Up About a minute (healthy) 8443/tcp
mtusi-lab7-broker-1 redis:8.6.8 "docker-entrypoint.s…" broker 3 minutes ago Up 3 minutes (healthy) 6379/tcp
mtusi-lab7-grafana-1 grafana/grafana:11.4.0 "/bin/sh -c 'export …" grafana About a minute ago Up About a minute 127.0.0.1:3000->3000/tcp
mtusi-lab7-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb About a minute ago Up About a minute (healthy) 127.0.0.1:8443-8445->8443-8445/tcp
mtusi-lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki About a minute ago Up About a minute 3100/tcp
mtusi-lab7-openbao-1 openbao/openbao:2.6.4 "bao server -config=…" openbao 17 minutes ago Up 15 minutes (healthy) 8200/tcp
mtusi-lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.111.0 "/otelcol-contrib --…" otel-collector About a minute ago Up About a minute
mtusi-lab7-otel-gw-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" otel-gw About a minute ago Up About a minute (healthy)
mtusi-lab7-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 14 minutes ago Up 14 minutes (healthy) 5432/tcp
mtusi-lab7-prometheus-1 prom/prometheus:v2.55.1 "/bin/prometheus --c…" prometheus About a minute ago Up About a minute (healthy) 9090/tcp
mtusi-lab7-redis-1 redis:8.6.8 "docker-entrypoint.s…" redis 3 minutes ago Up 3 minutes (healthy) 6379/tcp
mtusi-lab7-s3-1 pgsty/minio:RELEASE.2026-08-04T00-00-00Z "/usr/bin/docker-ent…" s3 14 minutes ago Up 14 minutes (healthy) 9000/tcp
mtusi-lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo About a minute ago Up About a minute
mtusi-lab7-worker-1 mtusi-messenger:lab7 "python -m app.worker" worker About a minute ago Up About a minute (healthy) 8443/tcp
[exit 0]
$ docker compose --env-file .env config --images
mtusi-messenger:lab7
grafana/tempo:2.6.1
otel/opentelemetry-collector-contrib:0.111.0
grafana/tempo:2.6.1
mtusi-messenger:lab7
haproxy:3.0.5-alpine
postgres:16.4-alpine
mtusi-messenger:lab7
openbao/openbao:2.6.4
redis:8.6.8
pgsty/minio:RELEASE.2026-08-04T00-00-00Z
haproxy:3.0.5-alpine
redis:8.6.8
grafana/loki:3.3.2
prom/prometheus:v2.55.1
grafana/grafana:11.4.0
[exit 0]
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe scripts/lab7.py status
Container mtusi-lab7-pki-run-13ee8b8769e7 Creating
Container mtusi-lab7-pki-run-13ee8b8769e7 Created
lb 5e4750312ca6226a75e26ae95c920569649c1ccf until 2027-03-02 active (issued 1)
api 50cce6049ba35e64bb5b2106b5c133c6a799e95c until 2027-03-02 active (issued 1)
worker 71cff8f134eae425db3b3de0e761ca63103113f5 until 2027-03-02 active (issued 1)
migrate 37276283a32d29fd2406987fd55cbce32b43557 until 2027-03-02 active (issued 1)
postgres 14872f2539375f9b88b385d9b5828b34fb698c3a until 2027-03-02 active (issued 1)
redis 57141d778043a0730d5967bebf87ddc09f6df1d0 until 2027-03-02 active (issued 1)
broker 56e54961655e27efc3c5bbf9fa0c83ca76628b until 2027-03-02 active (issued 1)
s3 522ba07b9c4d349ec1cfda09813f10ae999f63c3 until 2027-03-02 active (issued 1)
openbao 4f460ed62fba96cfb4c074266c9cd3a461017e4 until 2027-03-02 active (issued 1)
otel-gw 293dddb23f7adf8e299850aab7083a1995b6b219 until 2027-03-02 active (issued 1)
otel-collector ff0be38903220da32764b2d17747c09472648a8 until 2027-03-02 active (issued 1)
prometheus 493bc67fbda31cacf600ee5921bd4efdab8aefdd until 2027-03-02 active (issued 1)
loki f6cca83aafed85eadeaf489f3ce9f9ce25a1225 until 2027-03-02 active (issued 1)
tempo 5df32da279361c141f39f304c59f5213f208da04 until 2027-03-02 active (issued 1)
grafana 191436396285f645dc555e1767215446deb495ec until 2027-03-02 active (issued 1)
redis-ops 3ac9ff81abb27e41a08f7fb24648a53e3f4b8a72 until 2027-03-02 active (issued 1)
broker-ops 24c5461ebf37f5ae324ebde46b95a635fe5f82bc until 2027-03-02 active (issued 1)
intruder 6c0ac69b9bf575a3f7c5131d216a262bb893f401 until 2027-03-02 active (issued 1)
revoked serials: 0
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi-lab7-api-1 mtusi-messenger:lab7 "python -m app" api About a minute ago Up About a minute (healthy) 8443/tcp
mtusi-lab7-api-2 mtusi-messenger:lab7 "python -m app" api About a minute ago Up About a minute (healthy) 8443/tcp
mtusi-lab7-broker-1 redis:8.6.8 "docker-entrypoint.s…" broker 3 minutes ago Up 3 minutes (healthy) 6379/tcp
mtusi-lab7-grafana-1 grafana/grafana:11.4.0 "/bin/sh -c 'export …" grafana About a minute ago Up About a minute 127.0.0.1:3000->3000/tcp
mtusi-lab7-lb-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" lb About a minute ago Up About a minute (healthy) 127.0.0.1:8443-8445->8443-8445/tcp
mtusi-lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki About a minute ago Up About a minute 3100/tcp
mtusi-lab7-openbao-1 openbao/openbao:2.6.4 "bao server -config=…" openbao 17 minutes ago Up 15 minutes (healthy) 8200/tcp
mtusi-lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.111.0 "/otelcol-contrib --…" otel-collector About a minute ago Up About a minute
mtusi-lab7-otel-gw-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" otel-gw About a minute ago Up About a minute (healthy)
mtusi-lab7-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 14 minutes ago Up 14 minutes (healthy) 5432/tcp
mtusi-lab7-prometheus-1 prom/prometheus:v2.55.1 "/bin/prometheus --c…" prometheus About a minute ago Up About a minute (healthy) 9090/tcp
mtusi-lab7-redis-1 redis:8.6.8 "docker-entrypoint.s…" redis 3 minutes ago Up 3 minutes (healthy) 6379/tcp
mtusi-lab7-s3-1 pgsty/minio:RELEASE.2026-08-04T00-00-00Z "/usr/bin/docker-ent…" s3 14 minutes ago Up 14 minutes (healthy) 9000/tcp
mtusi-lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo About a minute ago Up About a minute
mtusi-lab7-worker-1 mtusi-messenger:lab7 "python -m app.worker" worker About a minute ago Up About a minute (healthy) 8443/tcp
openbao: {'initialized': True, 'sealed': False, 'version': '2.6.4', 'storage_type': 'raft'}
$ docker compose --env-file C:\Users\79152\Desktop\mtusi2026lab7\.env --profile ops run --rm pki list
$ docker compose --env-file C:\Users\79152\Desktop\mtusi2026lab7\.env ps
[exit 0]
+67
View File
@@ -0,0 +1,67 @@
# student-tests
# date: 2026-12-03T00:24:49 commit: cbbe525
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/run.py --base-url https://localhost:8443
== аутентификация ==
ok - wrong password -> 401 + Basic challenge
ok - unknown user -> 401 (same as wrong password)
ok - no token -> 401 + Bearer challenge
ok - X-User-Id alone gives no access
ok - unknown/forged token -> 401
ok - Basic on business endpoint -> 401
ok - X-User-Id cannot override bearer identity
ok - password shorter than 12 -> 400
== logout ==
ok - logout -> 204
ok - token after logout -> 401
ok - second logout -> 401
== гонка регистрации одного username ==
ok - 20 parallel registrations -> one 201, nineteen 409 (got [201, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409])
== ошибки и доступ (из lab1) ==
ok - malformed JSON -> 400
ok - duplicate username -> 409
ok - invalid username 'review123\n' -> 400, not 500 (got 400)
ok - invalid username 'review123\r\n' -> 400, not 500 (got 400)
ok - invalid username ' review123' -> 400, not 500 (got 400)
ok - invalid username 'Review123' -> 400, not 500 (got 400)
ok - invalid username 'ab' -> 400, not 500 (got 400)
ok - blank message -> 400
ok - sender_id in body is rejected
ok - outsider POST to foreign chat -> 404
ok - outsider GET foreign history -> 404
ok - invalid chat uuid -> 400
== пагинация ==
ok - 5 messages / limit 2 -> 3 pages, no duplicates
ok - cursor from another chat -> 400
== Content-Type ==
ok - valid JSON with text/plain -> 415 (got 415)
ok - message with text/plain -> 415 (got 415)
ok - text/plain without token -> 401 first (got 401)
ok - application/json; charset=utf-8 accepted (got 201)
30 passed, 0 failed
[exit 0]
$ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/idempotency.py --base-url https://localhost:8443
== 20 параллельных запросов с одним ключом ==
ok - all parallel repeats -> 201 (got [201])
ok - all responses carry the same message id (1 distinct)
ok - requests were served by >=2 replicas (2)
ok - exactly one message in history
ok - every replay returns the identical Message
== семантика ключа ==
ok - same key, different body -> 409 (got 409)
ok - other JSON formatting = same request (got 201)
ok - same key in another chat is independent
ok - same key from another user is independent
ok - missing Idempotency-Key -> 400 (got 400)
ok - invalid key 'has space'... -> 400 (got 400)
ok - invalid key 'xxxxxxxxxxxx'... -> 400 (got 400)
ok - invalid key 'slash/key'... -> 400 (got 400)
ok - replay without session -> 401, access re-checked (got 401)
== неопределённый результат: клиент повторяет с тем же ключом ==
ok - retry after uncertain result -> 201
ok - still exactly one message
16 passed, 0 failed
[exit 0]
+46
View File
@@ -0,0 +1,46 @@
# telemetry-config
# date: 2026-12-03T00:29:19 commit: cbbe525
$ docker compose --env-file .env ps otel-gw otel-collector prometheus loki tempo grafana
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi-lab7-grafana-1 grafana/grafana:11.4.0 "/bin/sh -c 'export …" grafana 7 minutes ago Up 7 minutes 127.0.0.1:3000->3000/tcp
mtusi-lab7-loki-1 grafana/loki:3.3.2 "/usr/bin/loki -conf…" loki 8 minutes ago Up 7 minutes 3100/tcp
mtusi-lab7-otel-collector-1 otel/opentelemetry-collector-contrib:0.111.0 "/otelcol-contrib --…" otel-collector 8 minutes ago Up 7 minutes
mtusi-lab7-otel-gw-1 haproxy:3.0.5-alpine "docker-entrypoint.s…" otel-gw 8 minutes ago Up 7 minutes (healthy)
mtusi-lab7-prometheus-1 prom/prometheus:v2.55.1 "/bin/prometheus --c…" prometheus 8 minutes ago Up 7 minutes (healthy) 9090/tcp
mtusi-lab7-tempo-1 grafana/tempo:2.6.1 "/tempo -config.file…" tempo 8 minutes ago Up 7 minutes
[exit 0]
$ docker compose --env-file .env exec -T prometheus promtool check config /etc/prometheus/prometheus.yml
Checking /etc/prometheus/prometheus.yml
SUCCESS: 1 rule files found
SUCCESS: /etc/prometheus/prometheus.yml is valid prometheus config file syntax
Checking /etc/prometheus/rules/messenger.yml
SUCCESS: 15 rules found
[exit 0]
$ docker compose --env-file .env exec -T prometheus promtool check rules /etc/prometheus/rules/messenger.yml
Checking /etc/prometheus/rules/messenger.yml
SUCCESS: 15 rules found
[exit 0]
$ docker compose --env-file .env logs --tail 15 otel-collector
otel-collector-1 | 2026-12-02T23:21:22.804Z warn service@v0.111.0/service.go:191 service::telemetry::metrics::address is being deprecated in favor of service::telemetry::metrics::readers
otel-collector-1 | 2026-12-02T23:21:22.804Z info telemetry/metrics.go:70 Serving metrics {"address": "127.0.0.1:8888", "metrics level": "Detailed"}
otel-collector-1 | 2026-12-02T23:21:22.805Z info memorylimiter/memorylimiter.go:75 Memory limiter configured {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "limit_mib": 160, "spike_limit_mib": 40, "check_interval": 1}
otel-collector-1 | 2026-12-02T23:21:22.805Z warn prometheusremotewriteexporter@v0.111.0/factory.go:47 Currently, remote_write_queue.num_consumers doesn't have any effect due to incompatibility with Prometheus remote write API. The value will be ignored. Please see https://github.com/open-telemetry/opentelemetry-collector/issues/2949 for more information. {"kind": "exporter", "data_type": "metrics", "name": "prometheusremotewrite"}
otel-collector-1 | 2026-12-02T23:21:22.806Z info service@v0.111.0/service.go:208 Starting otelcol-contrib... {"Version": "0.111.0", "NumCPU": 6}
otel-collector-1 | 2026-12-02T23:21:22.806Z info extensions/extensions.go:39 Starting extensions...
otel-collector-1 | 2026-12-02T23:21:22.807Z info extensions/extensions.go:42 Extension is starting... {"kind": "extension", "name": "health_check"}
otel-collector-1 | 2026-12-02T23:21:22.807Z info healthcheckextension@v0.111.0/healthcheckextension.go:33 Starting health_check extension {"kind": "extension", "name": "health_check", "config": {"Endpoint":"127.0.0.1:13133","TLSSetting":null,"CORS":null,"Auth":null,"MaxRequestBodySize":0,"IncludeMetadata":false,"ResponseHeaders":null,"CompressionAlgorithms":null,"ReadTimeout":0,"ReadHeaderTimeout":0,"WriteTimeout":0,"IdleTimeout":0,"Path":"/","ResponseBody":null,"CheckCollectorPipeline":{"Enabled":false,"Interval":"5m","ExporterFailureThreshold":5}}}
otel-collector-1 | 2026-12-02T23:21:22.807Z info extensions/extensions.go:59 Extension started. {"kind": "extension", "name": "health_check"}
otel-collector-1 | 2026-12-02T23:21:22.809Z info otlpreceiver@v0.111.0/otlp.go:169 Starting HTTP server {"kind": "receiver", "name": "otlp", "data_type": "traces", "endpoint": "127.0.0.1:14318"}
otel-collector-1 | 2026-12-02T23:21:22.811Z info prometheusreceiver@v0.111.0/metrics_receiver.go:118 Starting discovery manager {"kind": "receiver", "name": "prometheus/self", "data_type": "metrics"}
otel-collector-1 | 2026-12-02T23:21:22.812Z info targetallocator/manager.go:179 Scrape job added {"kind": "receiver", "name": "prometheus/self", "data_type": "metrics", "jobName": "otel-collector"}
otel-collector-1 | 2026-12-02T23:21:22.814Z info healthcheck/handler.go:132 Health Check state change {"kind": "extension", "name": "health_check", "status": "ready"}
otel-collector-1 | 2026-12-02T23:21:22.814Z info service@v0.111.0/service.go:234 Everything is ready. Begin running and processing data.
otel-collector-1 | 2026-12-02T23:21:22.814Z info prometheusreceiver@v0.111.0/metrics_receiver.go:187 Starting scrape manager {"kind": "receiver", "name": "prometheus/self", "data_type": "metrics"}
[exit 0]
+139
View File
@@ -0,0 +1,139 @@
# tls-audit
# date: 2026-12-03T00:23:16 commit: cbbe525
$ docker compose --env-file .env --profile ops run --rm sectest student-tests/tls_audit.py
Container mtusi-lab7-sectest-run-66b95663f541 Creating
Container mtusi-lab7-sectest-run-66b95663f541 Created
== LB → API (каждая реплика): mTLS + allowlist identity lb + CRL
ok lb→api реплик за именем api -> 2
ok lb→api 172.25.0.2 identity lb (разрешена) -> 200
ok lb→api 172.25.0.2 без сертификата -> closed by server
ok lb→api 172.25.0.2 чужой CA (CN=lb!) -> closed by server
ok lb→api 172.25.0.2 тот же CA, identity intruder -> closed by server
ok lb→api 172.25.0.2 тот же CA, identity worker -> closed by server
ok lb→api 172.25.0.2 тот же CA, identity grafana -> closed by server
ok lb→api 172.25.0.2 клиент: неверное имя сервера -> server cert rejected: Hostname mismatch, certificate is not valid for 'postgres'.
ok lb→api 172.25.0.3 identity lb (разрешена) -> 200
ok lb→api 172.25.0.3 без сертификата -> closed by server
ok lb→api 172.25.0.3 чужой CA (CN=lb!) -> closed by server
ok lb→api 172.25.0.3 тот же CA, identity intruder -> closed by server
ok lb→api 172.25.0.3 тот же CA, identity worker -> closed by server
ok lb→api 172.25.0.3 тот же CA, identity grafana -> closed by server
ok lb→api 172.25.0.3 клиент: неверное имя сервера -> server cert rejected: Hostname mismatch, certificate is not valid for 'postgres'.
ok lb→api plaintext HTTP на порт API -> no plaintext answer
== API/worker → broker: mTLS, CN сертификата = ACL-пользователь (producer / consumer)
ok api/worker→broker api: XLEN потока (диагностика) -> OK:0
ok api/worker→broker api: XREADGROUP (consumer) — запрещено -> NOPERM User api has no permissions to run the 'xreadgroup' command
ok api/worker→broker api: XACK — запрещено -> NOPERM User api has no permissions to run the 'xack' command
ok api/worker→broker api: FLUSHALL — запрещено -> NOPERM User api has no permissions to run the 'flushall' command
ok api/worker→broker api: CONFIG — запрещено -> NOPERM User api has no permissions to run the 'config|get' command
ok api/worker→broker worker: XINFO GROUPS -> OK:[{b'name': b'workers', b'consu
ok api/worker→broker worker: ключи сессий — запрещено -> NOPERM No permissions to access a key
ok api/worker→broker worker: CONFIG SET — запрещено -> NOPERM User worker has no permissions to run the 'config|set' command
ok api/worker→broker тот же CA, CN intruder — нет ACL-пользователя -> NOAUTH HELLO must be called with the client already authenticated, otherw
ok api/worker→broker тот же CA, CN grafana -> NOAUTH HELLO must be called with the client already authenticated, otherw
ok api/worker→broker чужой CA -> conn refused: Error while reading from broker:6379 : (1, '[SSL:
ok api/worker→broker без сертификата -> conn refused: Error while reading from broker:6379 : (1, '[SSL:
ok api/worker→broker ACL DRYRUN api XADD -> OK
ok api/worker→broker ACL DRYRUN worker XREADGROUP -> OK
ok api/worker→broker ACL DRYRUN worker XADD -> OK
== API → redis (кэш сессий, общий rate limit): mTLS, ACL api — только sess:*, rl:*
ok api→redis api: GET sess:* -> OK:None
ok api→redis api: INCR rl:* (rate limit) -> OK
ok api→redis api: KEYS * — запрещено -> NOPERM User api has no permissions to run the 'keys' command
ok api→redis api: чужой префикс ключей -> NOPERM No permissions to access a key
ok api→redis worker: в кэш доступа нет -> NOAUTH HELLO must be called with the client already authenticated, otherw
ok api→redis тот же CA, CN intruder -> NOAUTH HELLO must be called with the client already authenticated, otherw
ok api→redis без сертификата -> conn refused: Error while reading from redis:6379 : (1, '[SSL: T
== API/worker → OpenBao: TLS + cert auth (CN = роль) + политика роли + TTL
ok app→openbao cert login api сертификатом api -> 200 ttl=900s policies=default,messenger-api
ok app→openbao cert login worker сертификатом worker -> 200 ttl=900s policies=default,messenger-worker
ok app→openbao роль api сертификатом worker -> 400
ok app→openbao роль api, тот же CA, CN intruder -> 400
ok app→openbao чужой CA (CN=lb) -> 400
ok app→openbao без сертификата -> 400
ok app→openbao роль worker сертификатом api -> 400
ok app→openbao api читает свой путь -> 200
ok app→openbao api: чужой путь worker -> 403
ok app→openbao api: путь migrate (владелец БД) -> 403
ok app→openbao api: запись в свой путь -> 403
ok app→openbao api: metadata/версии -> 403
ok app→openbao api: изменить свою политику -> 403
ok app→openbao api: список политик -> 403
ok app→openbao api: выпустить токен -> 403
ok app→openbao worker: путь api (ключи S3/пароль БД api) -> 403
ok app→openbao renew-self токена api -> 200 ttl=900
ok app→openbao после revoke-self токен не работает -> 403
ok app→openbao plaintext HTTP -> no plaintext answer
== API/worker → PostgreSQL: TLS verify-full + клиентский сертификат (CN = роль) + SCRAM
ok app→postgres api: сертификат api + пароль api -> OK:api
ok app→postgres worker: сертификат worker + пароль -> OK:worker
ok app→postgres роль api, сертификат worker -> password authentication failed for user "api"
ok app→postgres роль api, тот же CA, CN intruder -> password authentication failed for user "api"
ok app→postgres роль api без сертификата -> connection requires a valid client certificate
ok app→postgres без TLS (sslmode=disable) -> pg_hba.conf rejects connection for host "172.21.0.9", user "api", database "messenger", no
ok app→postgres сертификат api, неверный пароль -> password authentication failed for user "api"
ok app→postgres суперпользователь postgres по сети -> pg_hba.conf rejects connection for host "172.21.0.9", user "postgres", database "messenger
ok app→postgres verify-full: подключение по IP (нет в SAN) -> server certificate for "postgres" (and 2 other names) does not match host name "172.21.0.5
ok app→postgres worker: SELECT users -> permission denied for table users
ok app→postgres worker: SELECT messages -> permission denied for table messages
ok app→postgres worker: SELECT sessions -> permission denied for table sessions
ok app→postgres api: DROP TABLE -> must be owner of table messages
ok app→postgres api: UPDATE attachments.status -> permission denied for table attachments
ok app→postgres api: CREATE TABLE -> permission denied for schema public
ok app→postgres api: DELETE users -> permission denied for table users
ok app→postgres api: SELECT users (нужно для входа) -> OK:6
== API/worker → MinIO: HTTPS + отдельный пользователь роли + prefix-политика
ok app→s3 api: PUT staging/ -> ALLOWED
ok app→s3 api: PUT originals/ -> AccessDenied
ok app→s3 api: GET staging/ -> AccessDenied
ok app→s3 worker: GET staging/ -> ALLOWED
ok app→s3 worker: PUT staging/ (только API принимает файлы) -> AccessDenied
ok app→s3 worker: PutBucketPolicy -> AccessDenied
ok app→s3 worker: DELETE staging/ (после обработки) -> ALLOWED
ok app→s3 plaintext HTTP -> no plaintext answer
== API/worker → Collector (otel-gw): mTLS + allowlist CN {api, worker} + CRL
ok app→collector OTLP как api -> 200
ok app→collector OTLP как worker -> 200
ok app→collector OTLP как grafana -> closed by gateway
ok app→collector OTLP как intruder -> closed by gateway
ok app→collector OTLP как rogue -> tls alert: TLSV1_ALERT_UNKNOWN_CA
ok app→collector OTLP как none -> tls alert: TLSV13_ALERT_CERTIFICATE_REQUIRED
ok app→collector приёмник Collector 14318 из сети -> ConnectionRefusedError
ok app→collector метрики Collector 8888 из сети -> ConnectionRefusedError
ok app→collector health Collector 13133 из сети -> ConnectionRefusedError
== Collector/Grafana → Prometheus/Loki/Tempo: mTLS; Prometheus — ещё и allowlist SAN
ok →prometheus как grafana -> 200
ok →prometheus как otel-collector -> 200
ok →prometheus как none -> tls alert: TLSV13_ALERT_CERTIFICATE_REQUIRED
ok →prometheus как rogue -> tls alert: TLSV1_ALERT_UNKNOWN_CA
ok →prometheus тот же CA, CN intruder -> tls alert: SSLV3_ALERT_BAD_CERTIFICATE
ok →loki как grafana -> 200
ok →loki как otel-collector -> 200
ok →loki как none -> tls alert: TLSV13_ALERT_CERTIFICATE_REQUIRED
ok →loki как rogue -> tls alert: TLSV1_ALERT_UNKNOWN_CA
ok →loki тот же CA, CN intruder -> 200
ok →tempo как grafana -> 200
ok →tempo как otel-collector -> 200
ok →tempo как none -> tls alert: TLSV13_ALERT_CERTIFICATE_REQUIRED
ok →tempo как rogue -> tls alert: TLSV1_ALERT_UNKNOWN_CA
ok →tempo тот же CA, CN intruder -> 200
== Оператор → Grafana: HTTPS, вход только с паролем
ok operator→grafana API без логина -> 401
ok operator→grafana HTTPS, сертификат сервера по CA -> 200
== Клиент → LB: только TLS ≥ 1.2, сертификат по CA и имени
ok client→lb TLS 1.0/1.1 -> SSLError
ok client→lb TLS 1.2+ по CA, SNI localhost -> 200
связей проверено: 12; проверок: 110; 110 passed, 0 failed
[exit 0]
+12
View File
@@ -0,0 +1,12 @@
# worker-limits
# date: 2026-12-03T00:25:04 commit: cbbe525
$ docker compose --env-file .env exec -T worker python -m app.tools limits-selftest
ok normal 320x200 with alpha: ok (3.9s)
ok pixel limit (36 Mp > limit 10 Mp): invalid_image: pixel limit (2.7s)
ok memory limit (36 Mp, RLIMIT_AS 120 MiB): invalid_image: memory limit (3.0s)
ok corrupt/truncated PNG: invalid_image: cannot decode: OSError (2.3s)
ok time limit (hangs 10 s, timeout 2 s): timeout(killed) (2.0s)
5 passed, 0 failed
[exit 0]