Verify cache archive digest before restore (#2) #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/2-verify-archive-digest"
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?
What changed
Caches restore from shared object storage with no integrity check, so a corrupted or poisoned object expands straight into the workspace/home cache paths (#2). Save now writes a sha256 sidecar (
<archive>.sha256) beside each archive, and restore recomputes the downloaded archive's digest and compares it against the sidecar before extracting.RASTER_CACHE_REQUIRE_DIGEST=truerefuses unverified archives outright (missing-but-expected fails closed too)..tar.gz/.tar.zstextension check, so it is never matched as a cache entry.How it was tested
make lintclean (actionlint/yq absent locally and skipped)make testgreen (62 tests)RASTER_CACHE_REQUIRE_DIGEST, plus unit coverage for the sidecar parser and that save writes a digest matching the archive bytesCHANGELOG updated? yes