Verify cache archive digest before restore #2

Closed
opened 2026-06-16 17:54:52 +00:00 by stephen · 0 comments
Owner

Why

Caches are restored from shared object storage, but cache-action has no metadata digest check before extracting an archive. A poisoned or corrupted object can be expanded directly into the workspace/home cache paths.

Verified

  • git grep origin/main -- src/lib digest sha256 shows key/version hashing but no archive digest sidecar verification.
  • src/lib/restore-impl.js downloads and extracts the matched object directly.
  • No existing cache-action issues are filed.

Build

  • Write a digest sidecar or object metadata on save.
  • Verify digest before restore and fail closed on mismatch.
  • Add tests for corrupt object and missing legacy digest behavior.
## Why Caches are restored from shared object storage, but cache-action has no metadata digest check before extracting an archive. A poisoned or corrupted object can be expanded directly into the workspace/home cache paths. ## Verified - `git grep origin/main -- src/lib digest sha256` shows key/version hashing but no archive digest sidecar verification. - `src/lib/restore-impl.js` downloads and extracts the matched object directly. - No existing cache-action issues are filed. ## Build - Write a digest sidecar or object metadata on save. - Verify digest before restore and fail closed on mismatch. - Add tests for corrupt object and missing legacy digest behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/cache-action#2
No description provided.