Skip to content

Commit 1204e6b

Browse files
committed
csaf: add notes object to document
This is in the spec https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#3217-document-property---notes Signed-off-by: crozzy <[email protected]>
1 parent b827efa commit 1204e6b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/csaf/csaf.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ type CSAF struct {
2626
//
2727
// https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#323-vulnerabilities-property
2828
Vulnerabilities []Vulnerability `json:"vulnerabilities"`
29+
30+
// Notes holds notes associated with the whole document.
31+
// https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#3217-document-property---notes
32+
Notes []Note `json:"notes"`
2933
}
3034

3135
// DocumentMetadata contains metadata about the CSAF document itself.
@@ -112,6 +116,13 @@ type Vulnerability struct {
112116
ReleaseDate time.Time `json:"release_date"`
113117
}
114118

119+
type Note struct {
120+
Category string `json:"category"`
121+
Text string `json:"text"`
122+
Title string `json:"title"`
123+
Audience string `json:"audience"`
124+
}
125+
115126
// Every ID item with the two mandatory properties System Name (system_name) and Text (text) contains a single unique label or tracking ID for the vulnerability.
116127
//
117128
// https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html#3236-vulnerabilities-property---ids

0 commit comments

Comments
 (0)