File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ type DocumentMetadata struct {
38
38
Title string `json:"title"`
39
39
Tracking Tracking `json:"tracking"`
40
40
References []Reference `json:"references"`
41
+ Publisher Publisher `json:"publisher"`
41
42
}
42
43
43
44
// Document references holds a list of references associated with the whole document.
@@ -58,6 +59,17 @@ type Tracking struct {
58
59
InitialReleaseDate time.Time `json:"initial_release_date"`
59
60
}
60
61
62
+ // Publisher provides information on the publishing entity.
63
+ //
64
+ // https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#3218-document-property---publisher
65
+ type Publisher struct {
66
+ Category string `json:"category"`
67
+ ContactDetails string `json:"contact_details"`
68
+ IssuingAuthority string `json:"issuing_authority"`
69
+ Name string `json:"name"`
70
+ Namespace string `json:"namespace"`
71
+ }
72
+
61
73
// Vulnerability contains information about a CVE and its associated threats.
62
74
//
63
75
// https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#323-vulnerabilities-property
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ func TestOpenRHAdvisory(t *testing.T) {
34
34
require .Equal (t , "AppStream-8.1.0.Z.MAIN.EUS" , doc .FirstProductName ())
35
35
36
36
require .Equal (t , "https://bugzilla.redhat.com/show_bug.cgi?id=1794290" , doc .Vulnerabilities [0 ].IDs [0 ].Text )
37
+
38
+ // Publisher
39
+ require .Equal (t , doc .Document .Publisher .Category , "vendor" )
40
+ require .Equal (t , doc .Document .Publisher .ContactDetails , "https://access.redhat.com/security/team/contact/" )
41
+ require .Equal (t , doc .Document .Publisher .IssuingAuthority , "Red Hat Product Security is responsible for vulnerability handling across all Red Hat offerings." )
42
+ require .Equal (t , doc .Document .Publisher .Name , "Red Hat Product Security" )
43
+ require .Equal (t , doc .Document .Publisher .Namespace , "https://www.redhat.com" )
37
44
}
38
45
39
46
func TestFindFirstProduct (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments