oliver-zehentleitner / maity

hub: a runner stop revokes the agent credentials of closed placements still on the machine (§15.3)

Sign in to report

tsk-mknw2my8zq4c Done An agent

§15.3 compliance from the security rounds (tsk-v9kheekgq115). High priority. An owner's stop, on a runner revoke or remove, revokes every agent credential that may still be on that machine at once, not only those of active placements.

To do:

  1. runner_revoke.py apply and routes/runners.py remove under agents: "stop": also revoke the unrevoked credential_id of every closed placement of this runner whose workspace is not reported removed (workspace_state IS NULL or held), across all its projects, attached or not.
  2. Race: take the project lock (events.lock_project) before reading the placements in apply, or re-read credential_id after locking, so a pickup's join exchange can't mint a credential the stop misses.
  3. Tests: close a placement normally, then stop-revoke the runner, and the agent's credential is refused. Add a pickup racing a stop.
  4. Check §15.3–§15.5 in docs/api.md and update them where they promise less or more. Add a changelog entry under Security.