GHSA-893r-j92f-5q9x: both resolved-variables routes took the
resource id, and the hierarchical one its workspace, project and
environment ids, straight from the query string and checked none
of them. Any account could name another workspace's id and read
its variable groups.
The caller must now be able to read the target resource and
every scope asked for; unknown resource types fail closed.