@@ -45,6 +45,7 @@ type Doc struct {
4545 CreationInfo CreationInfo `json:"creationInfo"`
4646 Packages []Package `json:"packages"`
4747 Relationships []Relationship `json:"relationships"`
48+ DocumentDescribes []string `json:"documentDescribes"`
4849}
4950
5051func MakeDoc (host , owner , name string , packages []Package ) Doc {
@@ -82,13 +83,14 @@ func MakeDoc(host, owner, name string, packages []Package) Doc {
8283 Creators : []string {"Organization: GitHub, Inc" , "Tool: gh-sbom" },
8384 Created : time .Now ().UTC ().Format ("2006-01-02T15:04:05Z" ),
8485 },
85- Relationships : []Relationship {},
86- Packages : append ([]Package {mainPackage }, packages ... ),
86+ Relationships : []Relationship {},
87+ Packages : append ([]Package {mainPackage }, packages ... ),
88+ DocumentDescribes : []string {mainPackage .SPDXID },
8789 }
8890
8991 for _ , p := range doc .Packages {
9092 doc .Relationships = append (doc .Relationships , Relationship {
91- Element : "SPDXRef- mainPackage" ,
93+ Element : mainPackage . SPDXID ,
9294 Type : "DEPENDS_ON" ,
9395 Related : p .SPDXID ,
9496 })
0 commit comments