Documentation ¶
Overview ¶
Package xsagit has functionality related to the Xen Project Security Team's `xsa.git` tree; specifically, pulling XSA version and public release information from tags in the tree.
Index ¶
Constants ¶
const ( XsaStateCreated = XsaState(iota) // No tagged version, TreeAdvisory !Deallocated XsaStateDeallocated = XsaState(iota) // Most recent tagged version is deallocated XsaStatePredisclosed = XsaState(iota) // Most recent tagged version is embargoed XsaStatePublic = XsaState(iota) // Most recent tagged version is public XsaStateWithdrawn = XsaState(iota) // Most recent tagged version is withdrawn )
Variables ¶
This section is empty.
Functions ¶
func XSAToSignedAdvisory ¶
XSAToSignedAdvisory generates the advisory filename from an XSA number.
Types ¶
type VersionInfo ¶
VersionInfo contains information about a particular XSA version: The time the version was created, the git hash which the version tags, and the contents of the advisory at that hash.
type XSARepoOpt ¶
type XSARepoOpt func(*getXSARepoOpt) error
XSARepoOpt is used to pass options into GetAdvisories
func FilterXSANums ¶
func FilterXSANums(xsanums ...int) XSARepoOpt
FilterXSANums will add a filter which only matches the listed XSA numbers. For example, the following will only get XSAs 436 and 437:
xsas, err := repo.GetAdvisories(xsagit.FilterXSANums(436, 437))
type XsaInfo ¶
type XsaInfo struct { Xsa int // Versions is indexed by "real" version number; i.e., Versions[1] contains // information about v1. This means Versions[0] is empty, and the total // number of versions is len(Versions)-1. Versions []VersionInfo TreeAdvisory parseadvisory.Advisory // The advisory as checked in at the tip of the tree State XsaState // Either the embargo time of the most recent version, or the version time // of the first non-embargoed version PublicReleaseTime time.Time }
func (*XsaInfo) LatestVersion ¶
func (xi *XsaInfo) LatestVersion() *VersionInfo
type XsaRepo ¶
type XsaRepo struct {
// contains filtered or unexported fields
}
func (*XsaRepo) GetAdvisories ¶
func (r *XsaRepo) GetAdvisories(options ...XSARepoOpt) (map[int]*XsaInfo, error)
GetAdvisories will parse advisories from the xsa.git repo, collating information about versions, current state (Created, Embargoed, Public), and public release time (either future of past).
func (*XsaRepo) GetFileReaderAtVersion ¶
func (r *XsaRepo) GetFileReaderAtVersion(vi *VersionInfo, filename string) (io.ReadCloser, error)
func (*XsaRepo) WriteVersionFiles ¶
func (r *XsaRepo) WriteVersionFiles(vi *VersionInfo, output string) error