Admin gating and ReadsStdin are per-handler conventions with no test #127

closed cmc opened this on 2026-09-03 05:16 UTC · control security · milestone v1.9.0

Discussion

cmc 2026-09-03 05:16 UTC

runAdminRepoVisibility (admin.go:417) and runAdminRepoDelete (:432) rely on adminRepo (:326) calling requireInstanceAdmin; runAdminRunners calls it directly. Nothing catches a new admin command that forgets. All 14 stdin commands set ReadsStdin today, by inspection only (control.go:108 drops stdin silently otherwise).

Remedy: gate Path[0]=="admin" in Dispatch; a test asserting ReadsStdin wherever Usage mentions stdin or --file -.

closed by commit 34a4fc3e58 by cmc: control: gate the admin noun in Dispatch, and test ReadsStdin

2026-09-03 18:47 UTC