provisioning.template.set / provisioning.common.set accept arbitrary unvalidated strings #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Both
provisioning.template.setandprovisioning.common.setaccept any string as a repo / service name without checking it against theavailablelist (or any real source of truth). Bogus entries get persisted to/etc/hero/provisioning.tomlsilently and only blow up later whenprovisioning.template.apply/provisioning.common.applyruns.Reproducer (against today's development tip)
Same behavior for
provisioning.common.setwith bogus service names:In both cases the daemon serialises the bogus list straight into
/etc/hero/provisioning.toml. The error surfaces only when an operator runs the matchingapplyand the build / per-user init fails.Suggested fix
In the
provisioning.template.setandprovisioning.common.sethandlers, reject entries that aren't present in the matchingavailablelist with a clearMethod param: unknown repo "x"style error before persisting. (Tolerate empty list since that already appears to be a no-op / reset semantics.)Impact
Quiet config corruption. Operators see no error at set time and only discover it during the next apply / rollout. Not security-critical (root-only RPCs), but a usability footgun.