-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support predicateType
: Field predicateType
Renamed to predicate_type
in Statement Struct
#363
Comments
predicateType
predicateType
: Field predicateType
Renamed to predicate_type
in Statement Struct
I think I see what's happening: In the type Statement struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,json=_type,proto3" json:"type,omitempty"`
Subject []*ResourceDescriptor `protobuf:"bytes,2,rep,name=subject,proto3" json:"subject,omitempty"`
PredicateType string `protobuf:"bytes,3,opt,name=predicate_type,json=predicateType,proto3" json:"predicate_type,omitempty"`
Predicate *structpb.Struct `protobuf:"bytes,4,opt,name=predicate,proto3" json:"predicate,omitempty"`
} We can see the |
@PuneetPunamiya thanks for reporting. Yes, the in-toto-golang data structures are not compatible with the protobuf-generated ones. Thanks for transitioning to the Go bindings in this repo as we are in the process of deprecating the APIs in in-toto-golang. I'm closing this issue since I see there's a closed PR related to this. Please let me know if this needs to be reopened. |
Signed-off-by: Andrew Gillis <gillis.andrew@gmail.com>
Signed-off-by: Andrew Gillis <gillis.andrew@gmail.com>
…e-go#326 Signed-off-by: Andrew Gillis <gillis.andrew@gmail.com>
We recently upgraded our dependency from
github.com/in-toto/in-toto-golang/in_toto
togithub.com/in-toto/attestation/go/v1
. While migrating, we encountered a breaking change related to the predicateType field in the Statement struct.In the previous version (github.com/in-toto/in-toto-golang/in_toto), the StatementHeader struct was defined as:
In the new version
github.com/in-toto/attestation/go/v1
, the Statement struct is defined as:With this when we try to run the cosign verification command it throws an error as
Because the payload has
predicate_type
instead ofpredicateType
Reference links for chains update - https://github.com/tektoncd/chains/pull/1111/files#diff-44a01d12a6c7c8d0b69c0e0c1773b23312d82ee4de20166c37f75a66823a026fL3
The text was updated successfully, but these errors were encountered: