Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶ added in v0.1.4
type Container struct { gorm.Model `json:"-"` ScanResultID uint `json:"-"` ContainerID string Name string }
Container has Container information
type CveInfo ¶
type CveInfo struct { gorm.Model `json:"-"` ScanResultID uint `json:"-"` CveDetail cve.CveDetail Packages []PackageInfo DistroAdvisories []DistroAdvisory CpeNames []CpeName }
CveInfo has Cve Information.
type DistroAdvisory ¶
type DistroAdvisory struct { gorm.Model `json:"-"` CveInfoID uint `json:"-"` AdvisoryID string Severity string Issued time.Time Updated time.Time }
DistroAdvisory has Amazon Linux, RHEL, FreeBSD Security Advisory information.
type NWLink ¶
type NWLink struct { gorm.Model `json:"-"` ScanResultID uint `json:"-"` IPAddress string Netmask string DevName string LinkState string }
NWLink has network link information.
type PackageInfo ¶
type PackageInfo struct { gorm.Model `json:"-"` CveInfoID uint `json:"-"` 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 Platform ¶ added in v0.1.5
type Platform struct { gorm.Model `json:"-"` ScanResultID uint `json:"-"` Name string // aws or azure or gcp or other... InstanceID string }
Platform has platform information
type ScanHistory ¶
type ScanHistory struct { gorm.Model ScanResults ScanResults ScannedAt time.Time }
ScanHistory is the history of Scanning.
type ScanResult ¶
type ScanResult struct { gorm.Model `json:"-"` ScanHistoryID uint `json:"-"` ScannedAt time.Time ServerName string // TOML Section key // Hostname string Family string Release string Container Container Platform Platform // Fqdn string // NWLinks []NWLink KnownCves []CveInfo UnknownCves []CveInfo Optional [][]interface{} `gorm:"-"` }
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
func (ScanResult) ServerInfo ¶ added in v0.1.4
func (r ScanResult) ServerInfo() string
ServerInfo returns server name one line
func (ScanResult) ServerInfoTui ¶ added in v0.1.4
func (r ScanResult) ServerInfoTui() string
ServerInfoTui returns server infromation for TUI sidebar
type ScanResults ¶
type ScanResults []ScanResult
ScanResults is slice of ScanResult.
func (ScanResults) FilterByCvssOver ¶
func (s ScanResults) FilterByCvssOver() (filtered ScanResults)
FilterByCvssOver is filter function.
func (ScanResults) Len ¶ added in v0.1.4
func (s ScanResults) Len() int
Len implement Sort Interface
func (ScanResults) Less ¶ added in v0.1.4
func (s ScanResults) Less(i, j int) bool
Less implement Sort Interface
func (ScanResults) Swap ¶ added in v0.1.4
func (s ScanResults) Swap(i, j int)
Swap implement Sort Interface