Engine reference — generated from the canonical engineering source. Do not edit this page by hand.
Known Security Gaps
This document lists known security limitations that are not yet addressed. These are tracked for future phases when triggers are met.
TLS for Inter-Service Communication
| Service | Current | Required For | Priority |
|---|---|---|---|
| Erlang distribution | TLS ACTIVATED on the live cluster by wild on 2026-09-22 (corrected single-term optfile; cluster probe 3/3 — see docs/tls-posture.md and docs/production-flip-checklist.md). Zerg-side support is complete: server/config/ssl_dist.conf.example + SOL_DIST_TLS_ENABLED (fail-closed optfile) in server/bin/entrypoint.sh; activation is -proto_dist inet_tls + -ssl_dist_optfile in the wild-rendered vm.args. Live verification/rotation remains wild-owned — the zerg tree cannot prove the current host state. epmd stays plaintext by design (it cannot speak TLS; residual = name enumeration + registration DoS on the LAN, documented) | Multi-node clustering | Medium — zerg-done + wild-activated; live verification owner = wild |
| ZMQ (worker plane) | Closed: CURVE encryption is default-on (server/src/sol_zmq_curve.erl, auto keyfile), and non-loopback plaintext refuses boot without an explicit ack or a declared tunnel (the boot posture check is zmq_transport_posture/1 in server/src/sol_app.erl). The fleet flip back to CURVE is designed; the wild host provisioning (keyfiles, env, ack removal) is the remaining leg | — | design closed; flip = wild pending |
| PostgreSQL | Sol’s PG connection sets no sslmode; the pool cannot even parse ?sslmode= query params (parse_pg_url) | Remote database | Medium — zerg half LANDED: the dedicated pool leg exists (memory_pg_ssl + memory_pg_ca_file — dedicated keys, never URL overloading; verify_peer, an ssl-without-CA connect refuses loud with {refuse_pg_connect, pg_ca_file_required}). Default false keeps today’s single-host-bridge posture; Mango’s sslmode=verify-full + sslrootcert and the server-side ssl=on with provisioned certs remain wild/Mango-window legs |
| Mango | Partial: one-way TLS via mango_tls=true + mango_ca_file with verify_peer; non-loopback plaintext refuses in production. Mango itself has NO TLS listener — the flip design terminates TLS in front of Mango (wild’s edge proxy) and points Sol’s verified client at it. Mutual TLS (client certificates) is still not implemented | Service-to-service auth | Low — partial; the terminator leg is wild-owned |
Mitigations
Erlang distribution: add -proto_dist inet_tls -ssl_dist_optfile <path> to the rendered vm.args with the shipped ssl_dist.conf.example (server + client legs verify_peer + fail_if_no_peer_cert); the cluster cookie STAYS (TLS adds confidentiality + server identity, the cookie remains the admission credential); update cluster-probe.sh/remsh/observer in the same window — a plain dist tool cannot join a TLS dist
ZMQ CURVE: shipped — chumak CURVE is vendored and default-on; the fleet flip follows the amended migration doc (Option A′). Static Luna artifact precondition: the musl binary speaks Curve only when its libzmq links libsodium — build/setup-musl.sh pins libsodium 1.0.20 + WITH_LIBSODIUM=ON with a fail-closed build probe, and ci/verify-static.sh --require-curve re-proves the shipped binary; wild’s zerg/musl-deps image must be re-derived from the fixed recipe (env-bound acceptance)
PostgreSQL: the fix is a dedicated pool config leg (code) + server-side ssl=on with provisioned certs (wild). URL-string ?sslmode= appending does NOT work today (parse_pg_url rejects query params — appending yields a corrupt database name)
Mango mTLS: one-way TLS ships (mango_tls); client-certificate validation would need terminating-proxy support (OpenResty client-verification in the wild topology)
Sandbox Network Egress
| Item | Status | Notes |
|---|---|---|
| Domain egress policy for sandboxed tool children (raw-IP bypass class) | Accepted risk | The default execution.sandbox.network=false is kernel-enforced no-egress (--unshare-net). With network=true, the hosts-file/allowlist policy is advisory only: a compromised child can reach IP literals, use its own resolver/DoH, connect over IPv6 (the hosts deny has no :: entry), or ignore the policy entirely; 0.0.0.0 deny rows can even reach loopback services on Linux. No domain-egress boundary is claimed. Full bypass class + evaluated designs + revisit triggers: docs/network-egress.md + plan/egress-control-evaluation.md |
Audit Logging
Audit logging is wired in production. sol_audit_log gen_server (child of sol_security_sup)
records tamper-evident audit entries with HMAC signing (decision archive #458, #570 — the
jsx:-undef chain break and its fix). Periodic flush
(5s), per-request identity capture. The /api/v1/audit/* read routes are RBAC-gated but answer an honest empty page (notice: audit_log_file_only) — the real trail is the JSONL log on disk; /api/v1/audit/verify is the anchored chain verdict.
| Feature | Status | Notes |
|---|---|---|
| Data access audit | Implemented | Tracks resource access with user_uuid + permissions |
| Configuration audit | Implemented | Tracks config changes via sol_managed_settings |
| Audit log integrity (Sol) | Implemented | HMAC signing via audit_hmac_secret env var |
| Audit log integrity (Mango) | Implemented | HMAC prev_signature chain + monotonic seq in audit_logs (migration v0003); MANGO_AUDIT_CHAIN_SECRET (random per-process key + CRITICAL when unset with auth on); signed checkpoint anchor (v0007) refreshed per write; signed checkpoint-history high-water anchor outside the history table (v0016) so a trimmed history tail + rolled-back singleton is detected; operator verify via Audit.verify_integrity — mutation AND truncation/wipe detection (truncated_head / truncated_tail / sequence_rewind / checkpoint_invalid / history_truncated), unanchored reported loudly when no anchor exists |
| Audit anchor full-wipe limit (Mango) | Known limitation | The head anchor lives in the same database (audit_chain_meta). An attacker with DB write who deletes the anchor, the entire history, the singleton checkpoint, and the log tail leaves the empty-store path, which is indistinguishable from a fresh install. Tail trimming and partial rollback are detected; proof against a complete wipe requires exporting the anchor/log (or the backup) off-host and comparing out of band. |
| Audit log retention (Mango) | Implemented | Operator-invoked, chunked prefix prune with a signed retained_from_seq floor advanced atomically per chunk (migration v0014); floor-aware verify (retained_from_seq + 1 is the legal root, rows above the cut keep full signature/adjacency/checkpoint checks; retention_floor_mismatch / retention_marker_invalid are typed); no automatic/date-based deletion and seq IS NULL legacy rows are never pruned. Contract: docs/audit-retention.md |
Foundation module: server/src/sol_audit_log.erl (Sol leg) and
mango/systems/audit.py (Mango leg, — chain fields/material/head
contract in docs/security.md). Mango audit archive endpoint at
POST /api/mango/audit-archive receives batched events.
** status:**
Chain-key rotation: implemented — Mango signs with the
current key while keeping prior keys for verification (keyed by
material/epoch, v0009 key_epoch); verification across a rotation
boundary returns a typed key_epoch verdict instead of a false
signature_mismatch. The old “rotation = silent evidence loss” shape is
closed.
Event-archive credential: the
audit_archive_secret leg is provisioned by wild on blue+green (2026-09-20;
Mango 200 POSTs on both nodes, cluster-probe 3/3). Zerg-side: the boot
posture line (unset-secret warning + the loopback-archive-target-vs-remote-
mango CRITICAL), the sol_event_archive:posture/0 operator probe, and the
SolEventArchiveUnconfigured alert on
increase(sol_event_archive_unconfigured_total[10m]) > 0. Red is
deliberately unprovisioned (no local Mango — only retry noise).
Secret lifecycle
| Item | Status | Notes |
|---|---|---|
| Provider keys at rest | Partially accepted | DECLARATIVE keys are never persisted — configs carry api_key_env NAMES and the pool holds plaintext in RAM only. OPERATOR-added pool keys ARE persisted since then (provider_key_store=true, shipped default): AES-256-GCM at <data_dir>/provider_keys.bin (0600, atomic write); a corrupt store logs/counts and fails OPEN. Residuals = crash dumps / swap for declarative keys (fixed by crash-dump hygiene, not a keystore) and the store’s own key → the store file is part of the data_dir backup/secret scope |
| Crash-dump exposure | Open — wild leg | ERL_CRASH_DUMP is unset fleet-wide; OS default lands erl_crash.dump in the process CWD (container /opt/sol, or red’s rootless CWD) where gen_server state (keys, tokens) is world-readable. Ask: -env ERL_CRASH_DUMP <protected path> + 0600 at boot in wild’s entrypoint |
| Provider-key rotation surface | Accepted for now (S-5) | Per-provider env vars = domain separation; pool supports 429-driven rotation/cooldown. Runtime add/rotate is a remote-shell call (sol_provider_pool:add_key/3) — no HTTP/CLI admin surface yet; document the ceremony before fleet growth |
| Revocation-journal retention | Closed | Bounded prefix-prune with an in-tx floor marker (revocation_journal_pruned_floor) + committed high-water marker; boot REFUSES tail/prefix/wipe regressions; burnt-epoch gaps are documented legal (mango/test/test_revocation_retention.py) |
| Luna msgpack recursion cap | Closed | The vendored decoder is first-party — the “needs an upstream fork” deferral was false. MessagePack.unpack/3 carries a depth cap (default 64, parameter); over-limit input fails typed (nil, "depth_exceeded"), never a stack overflow |
| Plugin memory namespace revocation | Open (S-10 row) | Memory rows plugin:<Plugin>:<UserUuid>:<Key> survive unload; a reloaded/less-trusted plugin inherits the previous generation’s memory. Fix shape: scoped prefix-delete on unload + an explicit opt-out + audit row. Registered for the next plugin-plane window |
Notes
These gaps were identified in the Tencent/GRiSP external audits and are tracked in the review archive (findings TA-1 through TA-8). They will be addressed when enterprise deployment requirements are met.