mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-03 13:11:05 +00:00
- 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.
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
# Optional, Linux-only egress allowlist for the ARTEX network. See egress-guard/README.md.
|
|
# Enable by adding this overlay to every compose command:
|
|
# docker compose -f docker-compose.yml -f docker-compose.egress.yml up -d
|
|
# It needs NET_ADMIN and edits the host firewall (DOCKER-USER chain). Without
|
|
# this overlay the main compose file is unchanged, so this is fully opt-in.
|
|
services:
|
|
artex:
|
|
# Route DNS through egress-guard's dnsmasq (on the network gateway), which
|
|
# feeds the allowlist. depends_on merges with the base file's postgres entry.
|
|
dns:
|
|
- 172.31.250.1
|
|
depends_on:
|
|
egress-guard:
|
|
condition: service_started
|
|
|
|
egress-guard:
|
|
build:
|
|
context: ./egress-guard
|
|
image: artex-egress-guard:local
|
|
network_mode: host
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- NET_RAW
|
|
environment:
|
|
# enforce (default when scope-domains.txt or scope-cidrs.txt has entries) |
|
|
# monitor (log only, default when scope lists are empty) | off (DNS only).
|
|
EGRESS_MODE: ${EGRESS_MODE:-}
|
|
ARTEX_SUBNET: 172.31.250.0/24
|
|
ARTEX_GATEWAY: 172.31.250.1
|
|
UPSTREAM_DNS: ${EGRESS_UPSTREAM_DNS:-}
|
|
volumes:
|
|
- ./egress-guard/lists:/etc/egress-guard:ro
|
|
- ./egress-guard/logs:/var/log/egress
|
|
restart: unless-stopped
|
|
|
|
# Give the ARTEX network a fixed subnet/gateway so dnsmasq and the firewall
|
|
# rules have a known address to bind and match.
|
|
networks:
|
|
default:
|
|
ipam:
|
|
config:
|
|
- subnet: 172.31.250.0/24
|
|
gateway: 172.31.250.1
|