mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
A RestoreJob with the Velero strategy took options.targetNamespace verbatim and, for a cross-namespace copy, checked only that the namespace existed. A tenant administrator could restore their own backup - Secrets, PVCs and data included - into any other tenant's namespace, or overwrite an application there. GHSA-vq9c-8j6p-r6mp / GHSA-p7mc-34g4-53vv / GHSA-4295-xcmq-8h9h. Require the target namespace to carry the tenant.cozystack.io/<restoreJob namespace> subtree label, the same marker the Cilium egress and tenant-namespace delete policies already use. The target is then the RestoreJob's own namespace or a descendant; a different tenant, a parent, a sibling or a system namespace is refused before any Velero Restore is created. Restore-copy within a tenant's own subtree keeps working. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>