From e85e0f969776ed8909bc784c127d25aeab814aae Mon Sep 17 00:00:00 2001 From: Cole Date: Sat, 2 Sep 2023 14:10:46 -0500 Subject: [PATCH] [WIP] Add support for TUF roots --- ent/schema/tuf.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ent/schema/tuf.go b/ent/schema/tuf.go index 75d75de2..e7815aca 100644 --- a/ent/schema/tuf.go +++ b/ent/schema/tuf.go @@ -13,6 +13,7 @@ type Target struct { func (Target) Fields() []ent.Field { return []ent.Field{ + //the trget file id field.String("gitoid_sha256").NotEmpty().Unique(), field.Int("length"), field.String("version"), @@ -23,9 +24,10 @@ func (Target) Fields() []ent.Field { func (Target) Edges() []ent.Edge { return []ent.Edge{ edge.To("signatures", Signature.Type), + //these are the digests of the target files such as a signed-policy.json edge.To("payload_digests", PayloadDigest.Type), edge.To("dsse", Dsse.Type), - edge.To("subjects", Subject.Type), + //subjects allow us to find policy targets for repos or artifacts } }