Documentation ¶
Overview ¶
Package webpage contains functions related to generating the XSA information webpage at https://xenbits.xenproject.org/xsa
Index ¶
- Constants
- func GenerateJSON(xsaOrig []*xsagit.XsaInfo, w io.Writer) error
- func GeneratePublicWebpage(xsapath, output string) error
- func Push[S ~[]E, E any](s S, e E) S
- func VersionSingleToVarraySingle(v parseadvisory.VersionSingle) *string
- func VersionToVArray(v parseadvisory.Version) []*string
- type XSAFileInfo
- type XSAInfo
- type XSATime
Constants ¶
const XSATimeFormat = `"2006-01-02 15:04"`
Variables ¶
This section is empty.
Functions ¶
func GenerateJSON ¶
GenerateJSON will take a list of XSAs write out JSON in canonical format to the writer.
XSAs and versions are sorted in ascending order.
A few differences to the perl xsa.json code:
We expose information for a lot more XSAs
cve and file fields were sometimes empty lists `[ ]`, and sometimes ommitted. This turns out not easy to do using golang's json.Marshal(); just omit empty lists all the time.
We don't yet expose the "docs_only" flag
func GeneratePublicWebpage ¶
func VersionSingleToVarraySingle ¶
func VersionSingleToVarraySingle(v parseadvisory.VersionSingle) *string
func VersionToVArray ¶
func VersionToVArray(v parseadvisory.Version) []*string
Types ¶
type XSAFileInfo ¶
type XSAInfo ¶
type XSAInfo struct { Deallocated bool `json:"deallocated,omitempty"` Cve []string `json:"cve,omitempty"` Files []XSAFileInfo `json:"files,omitempty"` PublicTime XSATime `json:"public_time"` Title string `json:"title,omitempty"` Version int `json:"version,omitempty"` VersionTime *XSATime `json:"version_time,omitempty"` Withdrawn bool `json:"withdrawn,omitempty"` XSA int `json:"xsa,string"` // For some reason this is a string rather than an integer }
XSAInfo contains information about a given XSA.
XenVersionList and ProjectList are "accumulated" values from Files, to make it easier to filter XSAs at the top level.