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
[audit] Medium/Low findings tracker (2026-06 suite audit) #175
Consolidated Medium/Low for spawn. Critical/High: #173#174.
[M sec] Wildcard IAM templates (s3:*/dynamodb:*/sqs:* on *) user-attachable to instance role. → gate FullAccess behind a flag; default to GenerateScoped* policies.
[M corr] Data race on Agent.config: EBS-cost goroutine writes while monitor reads/replaces the pointer. → mutex/atomic.Pointer; run agent tests with -race.
✅ [M corr] Data race on Agent.config: the monitor loop swaps the config pointer (periodic tag refresh) while the FSx-mount and spot-monitor goroutines read it. Access now goes through a mutex-guarded snapshot (cfg()/setConfig()); mountPendingFSx reads a single snapshot. Also removed a redundant racy write of the EBS hourly cost from a startup goroutine (it already propagates via the instance tag + periodic refresh). Agent tests now pass under -race (they previously failed).
✅ [M health] Removed the byte-identical duplicated zombie-prevention block (the double --no-timeout warning).
✅ [L health]configRefreshTick moved from a package global into the Agent struct.
Deferred (need a product/security-architecture decision — leaving open):
[M sec] Wildcard IAM templates (s3:*/dynamodb:*/sqs:* on *) user-attachable to the instance role → gate FullAccess behind a flag; default to GenerateScoped* policies.
[L sec] DNS registration over SSH disables host-key verification (MITM window) → register from inside the instance via user-data/SSM.
[L sec] Long-lived IAM creds sent to the hosted Lambda via X-AWS-Credentials → prefer SigV4/presigned GetCallerIdentity.
[L ergo]--no-timeout disables cost guardrails with only a warning → require a paired confirm flag / document the reaper max-age ceiling.
Re-verification against current code (v0.76.0) — 2026-07-16
3 of 7 fixed organically since June; 4 still open.
[M sec] Wildcard IAM templates — ❌ STILL-OPEN. pkg/aws/iam.go:195-270 still defines s3:*/dynamodb:*/sqs:*-on-* FullAccess templates, attachable via buildInlinePolicy (iam.go:691) with no gating flag. Scoped GenerateScoped* generators exist but don't gate the FullAccess path.
[M corr] Data race on Agent.config — ✅ FIXED. Now guarded by configMu sync.RWMutex + cfg()/setConfig() accessors (pkg/agent/agent.go:43-44,110-124); EBS-cost goroutine no longer writes config (agent.go:166-179). Caveat: CI does not run go test -race (Makefile uses plain go test).
[M health] Duplicated zombie-prevention block — ❌ STILL-OPEN. After the [audit] Refactor: split cmd/launch.go (4324 LOC god-file) along its 5 concerns #318 launch.go split it's now copy-pasted across launch_single.go:290-302, launch_batchqueue.go:211-219, launch_sweep.go:246-248; the doubled "CRITICAL SAFETY CHECK" comment remains at launch_single.go:284/287. No shared helper.
[L health] configRefreshTick package global — ✅ FIXED. Now an Agent struct field (agent.go:99-102).
[L ergo] --no-timeout warn-only — ❌ STILL-OPEN (flag ergonomics). Warning only (launch_single.go:296-302 et al.); partial backstops exist (sweep requires --ttl/--idle-timeout with --no-detach; server-side ttl-reaper ceiling) but no confirm/paired-flag on the flag itself.
Remaining: wildcard-IAM (M sec), dup zombie block (M health), --no-timeout ergo (L). DNS-over-SSH → folded into #349. Will address the rest repo-by-repo.
Remaining code items closed by PR #364 (merged): wildcard *:FullAccess IAM gate (--iam-allow-full-access), --no-timeout confirmation, de-duplicated zombie-guard, and pkg/agent under -race in CI. The only item not addressed here is DNS-registration-over-SSH (L sec), which is a duplicate of #349's follow-up (move DNS registration into spored) — tracked there. This tracker can be closed once #349 lands.
All actionable code items shipped in PR #364 (wildcard-IAM opt-in gate, --no-timeout confirmation, de-duplicated zombie-guard, pkg/agent under -race in CI). The 2 audit-named symbols in #290's scope were already handled; the remaining Medium/Low items were verified fixed or shipped. The one item not fixed here — DNS-registration-over-SSH with host-key verification disabled (L sec) — is a duplicate of #349 (move DNS registration into spored), now noted there. Closing; #349 carries the DNS follow-up.
Activity
fix: address #175 medium/low audit items
scttfrdmn commentedon Jun 21, 2026
Addressed in
e5468c4:Agent.config: the monitor loop swaps the config pointer (periodic tag refresh) while the FSx-mount and spot-monitor goroutines read it. Access now goes through a mutex-guarded snapshot (cfg()/setConfig());mountPendingFSxreads a single snapshot. Also removed a redundant racy write of the EBS hourly cost from a startup goroutine (it already propagates via the instance tag + periodic refresh). Agent tests now pass under-race(they previously failed).--no-timeoutwarning).configRefreshTickmoved from a package global into theAgentstruct.Deferred (need a product/security-architecture decision — leaving open):
s3:*/dynamodb:*/sqs:*on*) user-attachable to the instance role → gate FullAccess behind a flag; default to GenerateScoped* policies.X-AWS-Credentials→ prefer SigV4/presigned GetCallerIdentity.--no-timeoutdisables cost guardrails with only a warning → require a paired confirm flag / document the reaper max-age ceiling.scttfrdmn commentedon Jul 16, 2026
Re-verification against current code (v0.76.0) — 2026-07-16
3 of 7 fixed organically since June; 4 still open.
pkg/aws/iam.go:195-270still definess3:*/dynamodb:*/sqs:*-on-*FullAccess templates, attachable viabuildInlinePolicy(iam.go:691) with no gating flag. ScopedGenerateScoped*generators exist but don't gate the FullAccess path.configMu sync.RWMutex+cfg()/setConfig()accessors (pkg/agent/agent.go:43-44,110-124); EBS-cost goroutine no longer writes config (agent.go:166-179). Caveat: CI does not rungo test -race(Makefile uses plaingo test).registerDNSstill usesStrictHostKeyChecking=no(launch_posthook.go:132-133,154). Tracking on Local-matching user login fails: spawn silently installs the wrong SSH key + DNS/connect used wrong user #349.X-AWS-Credentialsin pkg/ or cmd/; DNS client SigV4-signs (pkg/dns/client.go:64-75,365-380).Agentstruct field (agent.go:99-102).Remaining: wildcard-IAM (M sec), dup zombie block (M health), --no-timeout ergo (L). DNS-over-SSH → folded into #349. Will address the rest repo-by-repo.
fix(spawn): close remaining 2026-06 audit findings (#175) (#364)
scttfrdmn commentedon Jul 16, 2026
Remaining code items closed by PR #364 (merged): wildcard
*:FullAccessIAM gate (--iam-allow-full-access), --no-timeout confirmation, de-duplicated zombie-guard, and pkg/agent under -race in CI. The only item not addressed here is DNS-registration-over-SSH (L sec), which is a duplicate of #349's follow-up (move DNS registration into spored) — tracked there. This tracker can be closed once #349 lands.scttfrdmn commentedon Jul 17, 2026
All actionable code items shipped in PR #364 (wildcard-IAM opt-in gate, --no-timeout confirmation, de-duplicated zombie-guard, pkg/agent under -race in CI). The 2 audit-named symbols in #290's scope were already handled; the remaining Medium/Low items were verified fixed or shipped. The one item not fixed here — DNS-registration-over-SSH with host-key verification disabled (L sec) — is a duplicate of #349 (move DNS registration into spored), now noted there. Closing; #349 carries the DNS follow-up.