- 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.
docker-compose.yml built ARTEX_PG_DSN by interpolating POSTGRES_PASSWORD, so
/, ?, %, @, : and spaces made the URL invalid. The server now assembles that
URL from ARTEX_PG_HOST, ARTEX_PG_PORT, ARTEX_PG_USER, ARTEX_PG_PASSWORD,
ARTEX_PG_DBNAME and ARTEX_PG_SSLMODE. An explicit ARTEX_PG_DSN still wins.
ARTEX_PG_PASSWORD is scrubbed with the other startup secrets.
- Introduced uniform skipping functions in the db package: SkipPGUnavailable and SkipNoPG.
- Updated all relevant test files to utilize these new functions for better consistency and readability.
- Added new db/testpg.go file to house the skipping logic.
- Created architecture and operations documentation to provide a comprehensive overview of the ARTEX system.
- Added a verification script to streamline local testing and ensure code quality.