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
security: DCV session HTML containing the auth token is written world-readable under ~/.spawn/sessions #1593
From the pre-1.0 security audit (spore-host/spore-host#649, 2026-11-11), audit id secrets-10. Verified: plausible, severity low (reviewer said low).
Where:cmd/app.go:1091 (at origin/main on 2026-11-11)
Evidence
app.go:1029-1030 MkdirAll(~/.spawn/sessions, 0755); app.go:1091 os.Create(path), giving 0644 under the usual umask. The template embeds const AUTH_TOKEN = '{{.AuthToken}}' (app.go:1179). cmd/cleanup.go:414 also creates ~/.spawn 0o755, though pkg/config/defaults.go:181 uses 0700.
Scenario
On a shared login or HPC host, which is a target environment, another local user can read the session file and reuse the long-lived DCV token to take over the desktop.
Verifier
spawn/cmd/app.go:1030 runs MkdirAll(~/.spawn/sessions, 0755) and :1091 calls os.Create, which gives 0644, for an HTML file embedding AUTH_TOKEN (:1179). MkdirAll does not change an existing parent, though, and pkg/config/defaults.go:181 creates ~/.spawn as 0700. When ~/.spawn already exists as 0700, or the home directory is 0700 as on most HPC hosts, other users cannot reach the file. Exposure depends on how the directories were created, and the token's lifetime was not verified.
Suggested fix
Create the sessions dir 0700 and the file 0600 (os.OpenFile with 0o600), and tighten ~/.spawn to 0700 everywhere.
Activity
Keep ~/.spawn and DCV session pages owner-only (#1593) (#1615)