-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the reference predicate #375
Conversation
Signed-off-by: Marco Deicas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got no juice here, but FWIW this looks good to me and enables all the functionality that Isaac and I talked about in https://sched.co/1YeQW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me for a first revision Thank You!
spec/predicates/reference.md
Outdated
|
||
`references` array of [ResourceDescriptor](../v1/field_types.md#resource_descriptor) objects, *required* | ||
|
||
The referred documents. The `mediaType` and `downloadLocation` of each SHOULD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should downloadLocation
be "MUST"? How useful would a reference attestation that doesn't point to something be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, changed to MUST.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe ResourceDescriptor defines it such that downloadLocation is only specified if it is different from the uri. Should we defer to those semantics? Otherwise there may be a conflict within the definition in
> The location of the described resource or artifact, if different from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the the uri
is left empty and digest
is provided, then wouldn't be a conflict.
Thanks for sending this! Would it be possible to create a protobuf definition |
Signed-off-by: Marco Deicas <[email protected]>
Signed-off-by: Marco Deicas <[email protected]>
I don't see how SCAI can't cover this use case. In fact, we have a few examples that show how SCAI can be used to transmit SBOM (or any other type of reference to another doc) without having to embed an entire SBOM in a Statement. Rather than re-inventing the wheel for one specific use case, I'd much rather we do attempt to standardize around specific attribute values (e.g., our example in scai-demos uses the GUAC verbs |
To add, I'm absolutely happy to work with you to explore different fields/values that could be standardized for this common use case (i.e. exchanging SBOM, having it consumed by GUAC). For instance, for this use case, the |
(copying my response from the original issue since it may be relevant to discussion)
Agreed on the overall goal of having a "predicate dictionary" type construct where we define here are all the predicates or properties and having guidance on how to consume them. It is difficult for me (who is perhaps uninformed) to understand the delineation around predicates and when something is a separate enough usecase for its own predicate. e.g. SCAI vs vulnerability, intoto link vs SLSA. |
Thanks for the responses. IMO a new predicate type has a few benefits over SCAI, but I agree that SCAI does work for the current use case at a technical level, and I'm happy to go with the option that the maintainers think is best. Is the SCAI predicate type spec a good place to define the attribute? The benefits I see for this dedicated predicate type is that it can evolve more easily (e.g. adding new fields) and is simpler to use for consumers (possibly fewer changes to the spec and the data "type" is encoded at the statement layer instead of the predicate layer). |
Sorry for my delay.
This is totally fair, and the more general feedback for us here is that we should set clearer guidelines for users of in-toto attestations to choose the right predicate(s), or describe more clearly when it really makes sense to create new ones. We have an upcoming maintainer's meeting, this would be a good topic to raise. Thanks!!
Yes, what I'm imagining is adding a new section to the spec titled something like "Supported Assertions" where we would catalogue the GUAC attributes and expected other field requirements/values for those assertions. This would also entail adding the appropriate verification logic to the SCAI APIs, much how we validate supported hash algorithms in resource descriptors.
I definitely understand this rationale. And the predicates are meant to be living specs that evolve as the community gathers feedback from users/consumers about use cases or usability. This is meant to be a community-driven process, so subsequent versions of the SCAI predicate (or any other) can definitely be amended to add/change fields, and better suit the broad use cases they were designed for. Could you please explain what you mean by "the type is encoded at the statement layer" in the case of the dedicated reference predicate? If a consumer just sees |
Given that we have the needed approvals for this PR, I won't stand in the way of merging. |
Adds the specification of a predicate to address #179.
One question I had was how to express what content the reference contains. I think the current use cases are met by the MIME type, and adding another field to specify this more explicitly would make the predicate more complex. If needed, it can be added in the future in a new version.
Open to feedback!