-
Notifications
You must be signed in to change notification settings - Fork 72
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 slsa provenance predicate v0.2 protobuf #417
Conversation
4c0de80
to
27218cf
Compare
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.
Thanks for sending this @kpauljoseph ! The proto looks great, though I do have one requested change.
Our convention is typically to track major versions of predicates, i.e. to store them in /v0
, /v1
etc. directories. Because this is the only pre-v1 version of Provenance that we support, I suggest renaming this directory structure (as well as the language binding packages) to v0
.
@marcelamelara should there be an exception for v0? v1, v2 etc make sense due to semver as changes are backwards compatible but we may well have very different protos for v0.1 and v0.2? I suggest allowing minor versions for v0 so that we don't have to rename a bunch for consistency later? |
@adityasaky good question. We've kind of been deciding this on a case by case basis for v0.x predicates. If we were to pull in the v0.1 provenance predicate (which I don't think is the intent) and they were vastly different, I'd say that we can distinguish between v0.1 and v0.2. We do this for the vulns predicate, for example. But for other predicates, we've bult the breaking changes into the same proto. I think for me the answer ultimately depends on how widely used the different v0.x predicates are. |
@marcelamelara I found repos like guacsec/guac importing "github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/v0.1" and "github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/v0.2" Are we supposed to rename the language bindings for v0.2 proto to the following?
|
27218cf
to
33d4df1
Compare
Signed-off-by: Paul Joseph <k.paul.joseph@gmail.com>
33d4df1
to
4a4ddf5
Compare
@kpauljoseph Thanks for doing this search. If GUAC is distinguishing these, then there are probably other systems that do this as well. EDIT: |
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.
LGTM ! Thanks again @kpauljoseph !
Yes, GUAC does use both import"github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/v0.1" and "github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/v0.2" as we want to be able to support ingestion of different versions of the spec.
I created an issue to switch it over: guacsec/guac#2450 |
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.
LGTM
This PR adds a proto definition for the slsa v0.2 predicate type as part of the ongoing deprecation efforts to move all the dependencies from in-toto/in-toto-golang to in-toto/attestation.
Followed the spec provided at https://slsa.dev/spec/v0.2/provenance