Files
ARTEX/agent
BaaRai ed70ea3220 security: promote company scope egress only when approved by the operator
An operator company approval froze the company's whole inventory into
task_scope_egress: every company_scope domain and IP/CIDR row plus the
root_domain, domain and ip of every asset attributed to the company. The
agent writes both (insert_assets, add_company_scope), so the next operator
selection or re-approval promoted worker-chosen hosts into the sandbox
egress allowlist for the life of the task.

The snapshot now reads only company_scope domain and IP/CIDR rules with
approved_by_operator = TRUE; the asset branches are gone. Migration 0025
adds the column and backfills existing rows as approved. The flag is an
explicit parameter of insertScopeRulesTx and the CompanyStore scope
writers: the operator company API passes true, add_company_scope and the
ScopeSentry sync pass false. An operator write of a rule the agent stored
first approves the existing row.

AddOperatorScope outside a transaction now commits the task_scope row and
the egress snapshot together.

Existing task_scope_egress rows are not purged.
2026-12-01 20:44:37 +01:00
..
2026-07-26 04:27:45 -04:00