You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Detached sweeps and pipeline stages can launch with a nested-spawn role (spawn-instance-nested-*) #1372
Found in the v0.147.0 pre-release IAM review. Both halves are new in v0.147.0 and unreleased: the orchestrator PassRole on spawn-instance-* (#1332/#1354) and the nested-spawn role (#39, PR #1348).
--nested-spawn is refused for sweeps, but orchestratorPassableProfile (cmd/launch_sweep_detached_iam.go) accepts any instancerole.NamePrefix (spawn-instance-) profile. That includes aws.NestedSpawnRolePrefix (spawn-instance-nested-). A param row with iam_role: spawn-instance-nested-<hash> therefore passes the CLI check.
SpawnSweepCrossAccountRole (scripts/setup-sweep-cross-account-role.sh) may iam:PassRolerole/spawn-instance-* to EC2. Simulated: the PassRole of role/spawn-instance-nested-f3113497 is allowed. The pipeline orchestrator's PassRole (lambda/pipeline-orchestrator/template.yaml) has the same shape.
So a sweep member or pipeline stage could hold a role that may call RunInstances and PassRole, without the --ttl requirement the --nested-spawn flag path enforces. The orchestrator would grant that capability to whoever writes the params, not only to callers who could pass the role themselves.
Fix, before the v0.147.0 tag:
The CLI refuses a nested profile on every detached path.
The sweep orchestrator (and the pipeline orchestrator, if it takes a role from user input) refuses it server-side.
An explicit IAM Deny of iam:PassRole on role/spawn-instance-nested-* goes in both orchestrator roles, so the grant can't depend on the code.
Gates: the simulation denies the nested PassRole and still allows the other spawn-instance-* roles, and both code refusals are watched failing against a revert.
Activity
fix(iam): no nested-spawn role in detached sweeps or pipeline stages (#…