ARTEX/cmd/artex
Dukotah ebb37c20bb feat(egress-guard): derive the scope lists from the operator-approved task scope
egress-guard reads hand-edited lists/scope-domains.txt and scope-cidrs.txt,
while the sandbox egress proxy builds its policy from PostgreSQL. Nothing
connected the two, so the overlay could drift from the approved scope (#421).

egress-guard/export-scope.sh regenerates both lists through the new
artex -export-egress-guard-scope. The export calls taskSandboxRunInfoChecked
(the error-returning form of taskSandboxRunInfo) and sandbox.NewEgressPolicy,
the derivation and parser of the per-task proxy, so only operator-approved
task scope, frozen company grants and operator task allow rules are exported.
Agent-added, auto-added and expanded rows are not.

Fail closed: taskSandboxRunInfoChecked reports the read errors the proxy path
ignores, any error fails the whole export, and the script touches neither
list until a complete, well-formed export was read; each list is then
replaced by rename. An empty export is refused unless --allow-empty, because
empty lists with EGRESS_MODE unset make the guard fall back to monitor.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 10:27:57 -08:00
..
egress_guard_export_test.go feat(egress-guard): derive the scope lists from the operator-approved task scope 2026-12-02 10:27:57 -08:00
main.go feat(egress-guard): derive the scope lists from the operator-approved task scope 2026-12-02 10:27:57 -08:00
main_test.go test(cmd): make snapshot test independent of Redact internals 2026-11-19 14:55:18 -03:00
rotate_secrets_test.go sec(p0): fail-closed startup, atomic secret rotation, scoped target-gate backfill, and kernel kill-switch 2026-11-30 17:41:46 +01:00