Files
cozystack/packages/system
Aleksei Sviridkin cdd78a249a fix(kubevirt): verify the operator manifest digest before vendoring
`make update` fetched the upstream release manifest straight over
templates/kubevirt-operator.yaml and applied its two transforms to
whatever arrived. A truncated download or an asset re-cut under an
existing tag both landed in the tree looking like a normal refresh, and
the only reviewer was whoever read the resulting diff. A wget that
failed outright was worse: `-O` had already emptied the vendored file
by then.

The fetch now happens outside templates/, is checked against
MANIFEST_SHA256, is transformed there, and only then moves in. So the
vendored file is written exactly once per refresh, with finished
content, and a failure at any step leaves it untouched. Keeping the
work out of templates/ matters because Helm renders every file in that
directory, and the directory also holds prometheusrule.yaml, which is
ours rather than upstream's.

Upstream signs the source tarball and publishes no checksum for this
generated manifest, so the pin is measured on download rather than
fetched alongside one. That makes it a detector for an asset moving
under its tag, not authenticity verification, and the comment says so.

RELEASE moves up to a make variable so the recipe and the pin sit
together. The digest command is resolved at parse time because
sha256sum is not universal: current macOS carries a native one, older
releases carry only shasum(1).

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-07 01:23:20 +03:00
..
…