Repository navigation
Description
This is the part of #1584 (pre-1.0 audit input-3) that the orchestrator cannot fix in its own code. The record names the target account, and nothing binds the record's writer to that account.
State after the #1584 PR: before every AssumeRole, the orchestrator refuses an aws_account_id that is not a 12-digit ID, is forbidden (pkg/trustboundary), or is its own control-plane account. It still acts in any other account whose SpawnSweepCrossAccountRole trusts it, chosen by whoever writes the spawn-sweep-orchestration item. #1586 already limits the blast radius there: CreateTags only at create, Terminate only spawn:managed=true. But RunInstances with a chosen user data and the spored role is still possible in any such account.
Why it cannot be checked at runtime today: every field of the record (aws_account_id, user_id, s3_params_key) comes from the writer. CreateSweepRecord (pkg/sweep/detached.go) writes user_id as the infra caller's ARN, and scheduler-handler copies schedule records written the same way. A Lambda Invoke carries no caller identity. There is no ExternalId, by owner decision.
Options, each with an infra change:
- A SigV4 front door (Function URL,
AuthType: AWS_IAM, like dns-updater). The CLI calls it with the compute-account credentials it already holds for the sweep role, and the door writes the record withaws_account_id= the verified caller account.PutItemonspawn-sweep-orchestrationandspawn-schedulesis then removed from every operator or CLI principal, leaving only the door and scheduler-handler. Schedules get the same door, so scheduled sweeps inherit a verified account. - An orchestrator-only MAC: a KMS HMAC key only the orchestrator and the door can use,
GenerateMacing(sweep_id, aws_account_id, s3_params_key)at creation. The orchestrator verifies it on every invocation. This is still a front door, because something must verify the account before minting the MAC. - An attestation in the target account: the CLI writes a per-sweep marker in the compute account (an SSM parameter
/spawn/sweeps/<sweep_id>holding the params hash), and the orchestrator reads it with the sweep role before launching. This needs a sweep-role grant and a schema bump, and it does not cover scheduled sweeps unless schedules are attested the same way.
Deployed-state check (owner), from the original finding: who holds dynamodb:PutItem/UpdateItem on spawn-sweep-orchestration, s3:PutObject on the params bucket, and lambda:InvokeFunction on spawn-sweep-orchestrator in 966362334030. If those are only operators who also own every compute account, nothing crosses a trust boundary today and this is hardening.
Activity
scttfrdmn commentedon Nov 14, 2026
One more residual from the #1584 finding:
SpawnSweepCrossAccountRolestill grantsec2:CancelSpotInstanceRequestson*with no condition (pkg/aws/sweep_role.go, the first Allow). A writer-chosen target account therefore also lets the orchestrator cancel any spot request there, not only its members'. Conditioning it on a tag needs the members' spot requests to be tagged at RunInstances (TagSpecificationswithResourceType: spot-instances-request). Worth doing together with the binding above.Sweep orchestrator: refuse an impossible target account before every …
Sweep orchestrator: refuse an impossible target account before every …
Sweep orchestrator: refuse an impossible target account before every …