oliver-zehentleitner / maity

web: placements / project runners: one own-live-runner rule (the project runners offer lists revoked runners) and one pair link

Sign in to report

tsk-2c1nvgrs6w5s Proposed

Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. View: placements, project runners. Kind: rule written two ways.

What is wrong

  • Two "allow my runner here" offers: placements.js attachOffer (:482-515, new) and project-runners.js drawAllow (:104-133); both list one's own runners and post {runner_id} to the project runners route.
  • Which runners are one's own live ones is written three times, two ways: placements.js:485 and :669 require credential_state === "active" and no removed_at; project-runners.js:105-106 and :116 check only removed_at, so they offer a revoked or unpaired runner, which the hub then refuses.
  • The pair link differs: /runners (placements.js:491) and /runners/pair (project-runners.js:115).
  • Not covered by tsk-tty3c3yrs62v (placement actions) or tsk-cghs51sathfh (quota words).

Proposal

  • One own-live-runner predicate in runners.js used at the three places; one pair link; optionally one shared allow control.

Effort / risk: S. Low.