Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

🤖 bug: a rolled-back Coder creation leaves its provisioning session (and a retry can reuse an expired token)

Chiusa
#5,113 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Trace the rollback path from WorkspaceService.abortUnsanitizedCreation and compare it with CoderSSHRuntime.finalizeConfig, postCreateSetup, and the existing validateBeforePersist disposal. Confirm how provisioningSessions are keyed and aged, then verify that a rollback disposes the session and that a later retry cannot reuse an expired token.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

A new-mode Coder creation (coder.existingWorkspace unset) creates a provisioning session in CoderSSHRuntime.finalizeConfig (coderService.ensureProvisioningSession(workspaceName), which runs coder tokens create --lifetime 5m). The session is consumed only by postCreateSetup (takeProvisioningSession), which runs in init after registration. When the creation rolls back before init (for example, the registration write rejects, #4745), nothing disposes it:

  • The session stays in CoderService.provisioningSessions for the process lifetime, and the token stays on the Coder deployment until it expires (5 min).
  • A retry with the same Coder workspace name gets the stale session back: ensureProvisioningSession returns an existing entry without checking its age, so a retry more than 5 minutes later may hand an expired token to coderService.createWorkspace.

validateBeforePersist already disposes the session when it refuses (disposeProvisioningSession); the registration rollback in WorkspaceService.abortUnsanitizedCreation does not.

Proposal

Dispose the provisioning session when a new-mode Coder creation rolls back before init (a runtime hook the rollback can call), and/or have ensureProvisioningSession replace a session older than its token lifetime.

Found while closing #4775 item 2 (SSH, Docker and Coder creations otherwise provision nothing before init). Pre-existing.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Lingua principale
TypeScript
Stelle
2.1k
Fork
140
Merge medio
4h 55m
PR unite (30g)
900

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/xum

Tutte le issue di coder/xum

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.