CoderWorkspacePool: count bound and used members only when their owner matches the pool's owner

Ouverte
#465 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
62/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
go, kubernetes
Domaine
infrastructure

Piste de recherche

Start in countPoolMembers in internal/controller/coderworkspacepool_controller.go (around lines 767-780) and find where the pool's resolved owner ID is computed so you can compare against it. Only increment the bound and used counts when a member's spec.ownerID matches that owner. Done when a foreign-owner bound member no longer changes boundReplicas or usedReplicas, and an envtest covering that case passes.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Problem

The pool counts a bound or used member toward its bound and used counts without checking that the member's spec.ownerID matches the pool's resolved owner. countPoolMembers (internal/controller/coderworkspacepool_controller.go:767-780) increments both counts before it checks any owner ID.

The #153 plan lists this as optional hardening (section 16, item 777(c) of the #357 final assessor items). The #463 round-2 verifier found it unimplemented and untracked.

Impact

Low. Users have read-only RBAC on members (threat T4), so only the operator or a cluster admin can create a member whose owner differs from its pool. Such a member can skew readyReplicas, boundReplicas or usedReplicas and the replacement decisions that use them.

Fix

Count a bound or used member only when its spec.ownerID equals the pool's resolved owner ID. Add an envtest with a foreign-owner bound member.

Refs #153.


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

Langage dominant
Go
Étoiles
5
Forks
3
Merge moyen
2 h 49 min
PR mergées (30 j)
206

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de coder/coder-k8s

Toutes les issues de coder/coder-k8s

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.