Skip to content

docs: add June 2026 security review - #43

Open
Mapika wants to merge 2 commits into
mainfrom
claude/repo-security-review-dn8gpl
Open

docs: add June 2026 security review#43
Mapika wants to merge 2 commits into
mainfrom
claude/repo-security-review-dn8gpl

Conversation

@Mapika

@Mapika Mapika commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Full-repo security review covering auth & secrets, the HTTP API surface,
the container/exec layer, persistence/CLI/packaging/CI, and the web UI.

One High finding (admin API key leaks into a world-readable install log in
scripts/setup-leader-vps.sh), a cluster of Medium hardening items, and
Low/Info defense-in-depth notes. No Critical issues. Documents verified-sound
practices and a recommended remediation order.

claude added 2 commits June 9, 2026 18:24
Full-repo security review covering auth & secrets, the HTTP API surface,
the container/exec layer, persistence/CLI/packaging/CI, and the web UI.

One High finding (admin API key leaks into a world-readable install log in
scripts/setup-leader-vps.sh), a cluster of Medium hardening items, and
Low/Info defense-in-depth notes. No Critical issues. Documents verified-sound
practices and a recommended remediation order.
Addresses the findings documented in docs/security-review-2026-06.md.

High:
- setup-leader-vps.sh: create install log 0600 and redact sk-... secrets so
  the bootstrap admin key never lands in a world-readable file.

Medium:
- /metrics now requires admin tier (was any valid key), preventing low-tier
  tenants from enumerating engine addresses / cluster topology.
- Admin auth bypass now keys solely on the explicit local_control_surface
  flag; dropped the fragile 'scope[client] is None' heuristic.
- Engine image digest pinning: optional pinned_digest in backends.yaml,
  verify_image_digest in DockerClient, enforced at launch in the manager.
- Drop default ipc_mode=host for engine containers (rely on private shm_size).
- net_guard blocks adopted deployments from dialing link-local/metadata/
  multicast addresses (SSRF), applied in dispatch and adapter load/unload.

Low/Info:
- UI admin token moved from localStorage to sessionStorage.
- /deployments/current/logs streams async with client-disconnect handling.
- Stop echoing raw engine response bodies to clients (log server-side).
- wipe --home refuses dirs without a berth marker; backup snapshot 0600;
  enrollment URI off argv (hidden prompt / env); docs use curl --cacert;
  hardened sample systemd unit; pinned uv installer version.

Cluster CERT_OPTIONAL is intentionally retained (the listener also serves the
certless enrollment/CA endpoints; certless WS is rejected at the app layer).

Tests: full suite green except 5 pre-existing root-in-sandbox environment
failures (TLS listener bind, owner-only perms as root, doctor writable-as-root)
present before these changes. New tests cover net_guard, digest pinning, the
metrics tier gate, wipe marker, backup perms, and enrollment input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants