Внедрение KESL на ВМ2 + замена CLAMAV на KESL

This commit is contained in:
mi
2026-09-08 01:39:37 +03:00
parent 85df788f2d
commit fdfdeaffb4
43 changed files with 2210 additions and 329 deletions
@@ -30,8 +30,16 @@ message-safety-config activate --version 1 --approved-by security-owner
`docker-compose.fragment.yml` is an include fragment for the root VM2 Compose. It publishes no
host port, runs API and worker as UID 10001 with a read-only filesystem, drops all capabilities,
and mounts only service-specific secret files. The root project owns networks/secrets and the
root-owned emergency mode file.
and mounts only service-specific secret files plus the broker Unix socket
`/run/han-kesl/scan.sock` into the worker. The root project owns networks/secrets and the
root-owned emergency mode file. KESL 12.4 standalone and its root-owned fail-closed broker are
host services, not Compose services; `clamd` and `freshclam` are absent from Compose.
The broker invokes the fixed host command `kesl-control --scan-file --action Inform`. A clean
result may continue to allow, an infected result denies, and scanner errors, unknown output,
timeouts or a stale KESL database remain retryable and eventually return `503` rather than
allowing content. Runtime records `scanner_engine=kesl`; `signatures_version` is the hash of KESL
version plus database date. KESL database updates run hourly under the operator KESL runbook.
## External release gates
@@ -41,8 +49,10 @@ target environment verifies them:
- Selectel S3 supports version-specific `GetObject`, signed conditional ETag behavior, bucket
versioning, checksum metadata, virtual-host addressing and a read-only IAM policy without
list/write/delete.
- ClamAV engine/signature metadata is supplied to readiness and task cache keys; freshclam
activate/reload, signature-age alarms and clean/EICAR/malformed corpora pass on VM2.
- KESL version/database date is supplied through the broker to readiness and task cache keys;
hourly update, stale-database alarms and clean/EICAR/malformed corpora pass on VM2.
- The broker is a custom integration: exact `kesl-control` output/exit semantics, socket
permissions, cleanup and throughput must pass gates on the target VM2 with KESL 12.4.
- HEIF native decoding and PDF parser sandbox resource limits pass the approved corpus. The
in-process detector is bounded by 5 MiB and validates active/encrypted PDF markers, but OS-level
CPU/memory/wall-time isolation must be enforced by the worker container and target runtime.