Validate artifact upload scope against repository #10

Open
opened 2026-07-05 20:04:50 +00:00 by stephen · 1 comment
Owner

Follow-up from rasterstate/download-artifact-action#15. The download-side fix rejects cross-repository reads when repository or RASTER_ARTIFACTS_SCOPE does not match GITHUB_REPOSITORY.

Upload should get the same scope validation for writes, so one repository cannot write or poison another repository's artifact prefix when repos share the same backend credential.

Expected fix: bind upload object keys to the current run's repository scope, or reject RASTER_ARTIFACTS_SCOPE/repository-style overrides unless backed by a signed scope claim.

Follow-up from rasterstate/download-artifact-action#15. The download-side fix rejects cross-repository reads when repository or RASTER_ARTIFACTS_SCOPE does not match GITHUB_REPOSITORY. Upload should get the same scope validation for writes, so one repository cannot write or poison another repository's artifact prefix when repos share the same backend credential. Expected fix: bind upload object keys to the current run's repository scope, or reject RASTER_ARTIFACTS_SCOPE/repository-style overrides unless backed by a signed scope claim.
Author
Owner

The #16 review showed that binding to GITHUB_REPOSITORY is still job-controlled and bypassable. The upload-side fix should mirror the signed-claim boundary from download-artifact-action#15 instead:

  • require RASTER_ARTIFACTS_SCOPE_CLAIM plus RASTER_ARTIFACTS_SCOPE_PUBLIC_KEY
  • verify an Ed25519 signature over the claim payload
  • derive the object prefix from the signed repository claim, not from GITHUB_REPOSITORY / RASTER_ARTIFACTS_SCOPE
  • fail closed if GITHUB_REPOSITORY or any explicit scope override disagrees with the signed claim

So this issue is still valid, but the expected fix should be signed repo-scope claims, not a client-side comparison to GITHUB_REPOSITORY.

The #16 review showed that binding to `GITHUB_REPOSITORY` is still job-controlled and bypassable. The upload-side fix should mirror the signed-claim boundary from download-artifact-action#15 instead: - require `RASTER_ARTIFACTS_SCOPE_CLAIM` plus `RASTER_ARTIFACTS_SCOPE_PUBLIC_KEY` - verify an Ed25519 signature over the claim payload - derive the object prefix from the signed `repository` claim, not from `GITHUB_REPOSITORY` / `RASTER_ARTIFACTS_SCOPE` - fail closed if `GITHUB_REPOSITORY` or any explicit scope override disagrees with the signed claim So this issue is still valid, but the expected fix should be signed repo-scope claims, not a client-side comparison to `GITHUB_REPOSITORY`.
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/upload-artifact-action#10
No description provided.