add skip_upload capability to contract#2528
Merged
migmartri merged 4 commits intochainloop-dev:mainfrom Nov 10, 2025
Merged
Conversation
Signed-off-by: Jeff Rescignano <jeffr@defenseunicorns.com>
282c7ae to
9cdbdbe
Compare
jiparis
reviewed
Nov 8, 2025
Member
jiparis
left a comment
There was a problem hiding this comment.
Thanks, just a comment in the proto definition
Signed-off-by: Jeff Rescignano <jeff@jeffresc.dev>
Signed-off-by: Jeff Rescignano <jeff@jeffresc.dev>
migmartri
approved these changes
Nov 9, 2025
Member
migmartri
left a comment
There was a problem hiding this comment.
LGTM in general.
My only comment would be if you could add a testCase in at least one of the material types (i.e TestSARIFCraft) we have today to make sure this new path is covered?
Signed-off-by: Jeff Rescignano <jeffr@defenseunicorns.com>
Contributor
Author
Yep, just added one for SARIF and CycloneDX |
Member
|
LGTM! |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces the ability to control whether materials are uploaded to CAS directly from workflow contracts. This is useful for scenarios where artifacts are large and already stored elsewhere, or when you only need to attest to their existence without storing them.
Contracts can now specify
skip_upload: trueon individual materials to skip uploading them to CAS while still recording their metadata (digest and filename) in the attestation.Example Usage
Features
Contract-controlled: Platform administrators define upload behavior in contracts
Metadata preservation: Even when upload is skipped, digest and filename are recorded in attestations
Backward compatible: Defaults to false (upload enabled) - existing contracts work unchanged
Flexible: Can be set per-material, allowing fine-grained control within a single workflow
Use Cases
Technical Details
skip_uploadboolean field to Material proto definitionUploadedToCas = falseand only metadata is capturedCONTAINER_IMAGEandSTRINGtypes remain unaffected (they never upload to CAS)Related Issues
Resolves #2522