Repository navigation
Closed
Labels
area:launchlaunch path: instance-type, AMI, user-data, runbugSomething isn't workingcomponent:spawntype:securitySecurity-relevant change or dependency
Milestone
Description
Bug: detached sweeps ignore AWS_PROFILE and launch in the spore-host-dev profile's account unless SPAWN_COMPUTE_PROFILE is set
pkg/config/endpoints.go:
func GetComputeProfile() string {
if val, ok := os.LookupEnv("SPAWN_COMPUTE_PROFILE"); ok { ... }
return "spore-host-dev"
}LoadComputeAWSConfig, which the detached-sweep path uses for the account the members launch in, loads that profile. So with AWS_PROFILE=<anything> and no SPAWN_COMPUTE_PROFILE:
- Detached sweeps launch in the wrong account. A detached sweep's members launch in whatever account the local
spore-host-devprofile points at, not the caller's account. Foreground launches do useAWS_PROFILE. - A user without a
spore-host-devprofile can't detach at all. The profile can't be loaded, so presumably the sweep fails.
Evidence (live, 2026-11-06, branch #1536 at 273aef33)
- The run:
AWS_PROFILE=aws(942542972736, an account with noSpawnSweepCrossAccountRole), thenspawn launch mr --param-file p.yaml --sweep-name mr …(a default detached sweep). - What happened:
- fix(sweep): honour --detach without --max-concurrent; decide the sweep path once (#1535) #1536's new role check passed, because it checked
spore-host-dev(435415984226), which has the role. - The sweep was submitted, and the orchestrator launched 2 t4g.small in 435415984226 (
i-07b2fb68…,i-0d399e0e…). I terminated them.
- fix(sweep): honour --detach without --max-concurrent; decide the sweep path once (#1535) #1536's new role check passed, because it checked
- The control: the same command with
SPAWN_COMPUTE_PROFILE=awswas correctly refused: "needs SpawnSweepCrossAccountRole in account 942542972736 … Nothing was created". No record, no params object and no role were created.
Why it matters
- Users: a detached sweep silently runs in an account other than the one the user selected. That's wrong placement, cost in the wrong account, and data in the wrong account.
- The trust boundary: the default being a spore.host dev account is a trust-boundary hazard in both directions. It matters especially for accounts where spore.host must not operate.
Suggested fix
- With no
SPAWN_COMPUTE_PROFILE, the compute profile should be the caller's own profile (SharedProfile()/ the default chain), not a hardcoded team profile name. - If the hardcoded default exists for the spore.host team's own split-account setup, move it to config (
~/.spawn/config.yaml), not code. - Print which compute account a detached sweep will launch in, before it's created.
- Add a test: with
AWS_PROFILE=xand noSPAWN_COMPUTE_PROFILE, the compute config resolves tox.
Metadata
Metadata
Assignees
Labels
area:launchlaunch path: instance-type, AMI, user-data, runbugSomething isn't workingcomponent:spawntype:securitySecurity-relevant change or dependency
Activity
docs: CHANGELOG and generated reference for compute_profile (#1538)
test: detached sweep tests follow the compute account (#1538)
fix(config): compute profile defaults to the caller's own credentials…