Commit Graph
2 Commits
Author SHA1 Message Date
BaaRai e3a54ef3ea sec(p0): fail-closed startup, atomic secret rotation, scoped target-gate backfill, and kernel kill-switch
- Startup fail-closed: LockDownKeyDir explicitly chmods 0700 an existing key
  dir (counteracting host bind mounts) and 0600 existing key files; adds keys/
  itself alongside jwt.key, secret.key, and config.json to IsolationSelfTest;
  makes IsolationSelfTest fatal unless ARTEX_ALLOW_UNISOLATED=1 is set.
- Secret rotation: adds db.RotateSecretKey (single atomic transaction
  re-encrypting all sealed columns/settings and bumping auth.password_version),
  cmd/artex -rotate-secrets, scripts/rotate-secrets.sh, and OPS/SECURITY docs.
- Scoped defaults, backfill & posture warnings: TargetGate defaults ON for
  tasks with CompanyIDs or InterceptRules (explicit opt-out persisted in
  tasks.target_gate_opt_out); migration 0022_target_gate_backfill.sql backfills
  existing active scoped tasks that did not explicitly opt out; egress-guard
  defaults to EGRESS_MODE=enforce when scope lists exist; loud startup warning
  when target gate or egress enforcement is off.
- Kernel-backed local kill-switch: enables PR_SET_CHILD_SUBREAPER and scans
  /proc (without trusting agent-writable state) on Engine.Pause/BeginDelete to
  kill escaped setsid, nohup, and nested double-fork daemons (plus all
  execPriv.UID processes in isolated mode) within <= 5s with zero post-pause
  egress.
2026-11-30 17:41:46 +01:00
Luis e91870a2ae feat: optional DNS-driven egress allowlist (separate compose file)
Add egress-guard, an opt-in Linux-only sidecar that permits outbound connections
from the ARTEX network only to the LLM endpoint, declared scope, and recon/package
sources, while auto-allowing discovered subdomains of in-scope domains so asset
discovery keeps working. Modes: monitor (default, log only) / enforce / off.

Shipped as docker-compose.egress.yml; the main compose file is untouched, so it is
fully opt-in. It needs NET_ADMIN and edits the host firewall (DOCKER-USER chain),
documented as Linux-only in egress-guard/README.md.
2026-11-20 10:47:36 -05:00