agent: enrolment facts are fabricated — one shared literal SSH host key, "skeleton" versions, and a GOOS env bug that hides full-install on Linux #281
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#281
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
agent/cmd/agent/main.go, untagged production build:runEnroll,runInstall):SSHHostKey: []byte("skeleton-ssh-host-key")— every fleet node enrolls with the same literal.internal/join/join.go:91documents the field as "minted at first run", and the real minter (internal/sshkey.Ensure) is already used by the helper. Inert today only because nothing readsPairRequest.SSHHostKeyyet — a landmine the moment anything does (host-key pinning is the field's purpose).OS: os.Getenv("GOOS")—GOOSis a build constant, not an env var, so this is""on every real machine.enroll.DefaultInstallModes(internal/enroll/ledger.go:746) only offersModeVM, ModeFullwhenos == "linux", so Linux hosts joining through the app silently get a VM-only consent menu. Line ~311 of the same file already usesruntime.GOARCHcorrectly.AgentVersion: "skeleton"/Release: "skeleton"on every heartbeat — version drift is invisible; a node stuck on an old agent reads identical to a current one.Acceptance
runtime.GOOSreplaces the env read; a Linux host's redeem offers full-install again (test at the DefaultInstallModes boundary).sshkey.Ensurepath instead of the literal.Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).
Fixed in
cde5d10(on origin/main).Three fabricated enrolment facts in
agent/cmd/agent/main.gocorrected:os.Getenv("GOOS")(empty at runtime) replaced byhostOS()→runtime.GOOS, mirroringhostArch(). A Linux host now redeems with full-install offered again; asserted at theenroll.DefaultInstallModesboundary (Linux ⇒ ModeFull,""⇒ never).[]byte("skeleton-ssh-host-key")literal replaced by a newinternal/sshkey.Ensurethat mints/loads a real per-machine ed25519 host key (private half persisted 0600, never transmitted; public half returned as the OpenSSH ssh-ed25519 wire blob), mirroring thedevicekeyidiom. Wired intorunEnrollandrunInstall."skeleton"replaced by a link-time-stampedversionvar (-X main.version=<release>) defaulting to an honest"unknown"; used forAgentVersion(all heartbeats) and the enroll bannerRelease.Red-first tests:
internal/sshkey/sshkey_test.go(mint/persist/reload stable, per-machine distinct, corrupt file fails loud) andagent/cmd/agent/main_test.go(DefaultInstallModes boundary + version honesty).go test/go vet/golangci-lintgreen (agent, sshkey, join); the pre-push Go gate passed. STATUS.md updated (header lead + milestone log).<api_url>/spaces) and the descriptor'sjoin_urlboth answer a browser sign-in redirect, so the first-steward fallback cannot run on a real gateway #1645