Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CveInfo ¶
type CveInfo struct { gorm.Model ScanResultID uint CveDetail cve.CveDetail Packages []PackageInfo DistroAdvisories []DistroAdvisory CpeNames []CpeName }
CveInfo has Cve Information.
type DistroAdvisory ¶
type DistroAdvisory struct { gorm.Model CveInfoID uint AdvisoryID string Severity string Issued time.Time Updated time.Time }
DistroAdvisory has Amazon Linux AMI Security Advisory information. TODO Rename to DistroAdvisory
type NWLink ¶
type NWLink struct { gorm.Model ScanResultID uint IPAddress string Netmask string DevName string LinkState string }
NWLink has network link information.
type PackageInfo ¶
type PackageInfo struct { gorm.Model CveInfoID uint Name string Version string Release string NewVersion string NewRelease string }
PackageInfo has installed packages.
func (PackageInfo) ToStringCurrentVersion ¶
func (p PackageInfo) ToStringCurrentVersion() string
ToStringCurrentVersion returns package name-version-release
func (PackageInfo) ToStringNewVersion ¶
func (p PackageInfo) ToStringNewVersion() string
ToStringNewVersion returns package name-version-release
type PackageInfoList ¶
type PackageInfoList []PackageInfo
PackageInfoList is slice of PackageInfo
func (PackageInfoList) Exists ¶
func (ps PackageInfoList) Exists(name string) bool
Exists returns true if exists the name
func (PackageInfoList) FindByName ¶
func (ps PackageInfoList) FindByName(name string) (result PackageInfo, found bool)
FindByName search PackageInfo by name
func (PackageInfoList) UniqByName ¶
func (ps PackageInfoList) UniqByName() (distincted PackageInfoList)
UniqByName be uniq by name.
type ScanHistory ¶
type ScanHistory struct { gorm.Model ScanResults []ScanResult ScannedAt time.Time }
ScanHistory is the history of Scanning.
type ScanResult ¶
type ScanResult struct { gorm.Model ScanHistoryID uint ServerName string // TOML Section key // Hostname string Family string Release string // Fqdn string // NWLinks []NWLink KnownCves []CveInfo UnknownCves []CveInfo }
ScanResult has the result of scanned CVE information.
func (ScanResult) CveSummary ¶
func (r ScanResult) CveSummary() string
CveSummary summarize the number of CVEs group by CVSSv2 Severity
type ScanResults ¶
type ScanResults []ScanResult
ScanResults is slice of ScanResult.
func (ScanResults) FilterByCvssOver ¶
func (results ScanResults) FilterByCvssOver() (filtered ScanResults)
FilterByCvssOver is filter function.