mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-12-03 21:23:54 +08:00
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>