Verify artifact sha256 digest before extraction #1

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

Why

upload-artifact writes a digest field in metadata, but download-artifact ignores it and extracts the downloaded archive directly.

Verified

  • upload-artifact-action/src/lib/upload-impl.js writes digest: sha256:... into metadata.
  • download-artifact-action/src/lib/download-impl.js loads only object/method/name and never checks digest.
  • No existing download-artifact-action issues are filed.

Build

  • Load the digest from metadata and hash the archive before extraction.
  • Fail closed on mismatch, with a compatibility path for legacy metadata without digest.
  • Add corrupt-object tests.
## Why upload-artifact writes a `digest` field in metadata, but download-artifact ignores it and extracts the downloaded archive directly. ## Verified - `upload-artifact-action/src/lib/upload-impl.js` writes `digest: sha256:...` into metadata. - `download-artifact-action/src/lib/download-impl.js` loads only object/method/name and never checks digest. - No existing download-artifact-action issues are filed. ## Build - Load the digest from metadata and hash the archive before extraction. - Fail closed on mismatch, with a compatibility path for legacy metadata without digest. - Add corrupt-object tests.
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/download-artifact-action#1
No description provided.