Documentation ¶
Index ¶
- type Container
- type CveInfo
- type CveInfos
- type DistroAdvisory
- type NWLink
- type PackageInfo
- type PackageInfoList
- func (ps PackageInfoList) Exists(name string) bool
- func (ps PackageInfoList) FindByName(name string) (result PackageInfo, found bool)
- func (ps PackageInfoList) MergeNewVersion(as PackageInfoList)
- func (ps PackageInfoList) ToUpdatablePacksSummary() string
- func (ps PackageInfoList) UniqByName() (distincted PackageInfoList)
- type PackageInfosByName
- type Platform
- type ScanHistory
- type ScanResult
- func (r ScanResult) AllCves() []CveInfo
- func (r ScanResult) CveSummary() string
- func (r ScanResult) FillCveDetail() (ScanResult, error)
- func (r ScanResult) FilterByCvssOver() ScanResult
- func (r ScanResult) ReportFileName() (name string)
- func (r ScanResult) ReportKeyName() (name string)
- func (r ScanResult) ServerInfo() string
- func (r ScanResult) ServerInfoTui() string
- type ScanResults
- type VulnInfo
- type VulnInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistroAdvisory ¶
DistroAdvisory has Amazon Linux, RHEL, FreeBSD Security Advisory information.
type PackageInfo ¶
type PackageInfo struct { Name string Version string Release string NewVersion string NewRelease string Repository 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) MergeNewVersion ¶ added in v0.2.0
func (ps PackageInfoList) MergeNewVersion(as PackageInfoList)
MergeNewVersion merges candidate version information to the receiver struct
func (PackageInfoList) ToUpdatablePacksSummary ¶ added in v0.2.0
func (ps PackageInfoList) ToUpdatablePacksSummary() string
ToUpdatablePacksSummary returns a summary of updatable packages
func (PackageInfoList) UniqByName ¶
func (ps PackageInfoList) UniqByName() (distincted PackageInfoList)
UniqByName be uniq by name.
type PackageInfosByName ¶ added in v0.2.0
type PackageInfosByName []PackageInfo
PackageInfosByName implements sort.Interface for []PackageInfo based on the Name field.
func (PackageInfosByName) Len ¶ added in v0.2.0
func (a PackageInfosByName) Len() int
func (PackageInfosByName) Less ¶ added in v0.2.0
func (a PackageInfosByName) Less(i, j int) bool
func (PackageInfosByName) Swap ¶ added in v0.2.0
func (a PackageInfosByName) Swap(i, j int)
type ScanHistory ¶
type ScanHistory struct {
ScanResults ScanResults
}
ScanHistory is the history of Scanning.
type ScanResult ¶
type ScanResult struct { ScannedAt time.Time Lang string ServerName string // TOML Section key Family string Release string Container Container Platform Platform // Scanned Vulns via SSH + CPE Vulns ScannedCves []VulnInfo KnownCves []CveInfo UnknownCves []CveInfo IgnoredCves []CveInfo Packages PackageInfoList Optional [][]interface{} }
ScanResult has the result of scanned CVE information.
func (ScanResult) AllCves ¶ added in v0.1.7
func (r ScanResult) AllCves() []CveInfo
AllCves returns Known and Unknown CVEs
func (ScanResult) CveSummary ¶
func (r ScanResult) CveSummary() string
CveSummary summarize the number of CVEs group by CVSSv2 Severity
func (ScanResult) FillCveDetail ¶ added in v0.2.0
func (r ScanResult) FillCveDetail() (ScanResult, error)
FillCveDetail fetches CVE detailed information from CVE Database, and then set to fields.
func (ScanResult) FilterByCvssOver ¶ added in v0.2.0
func (r ScanResult) FilterByCvssOver() ScanResult
FilterByCvssOver is filter function.
func (ScanResult) ReportFileName ¶ added in v0.2.0
func (r ScanResult) ReportFileName() (name string)
ReportFileName returns the filename on localhost without extention
func (ScanResult) ReportKeyName ¶ added in v0.2.0
func (r ScanResult) ReportKeyName() (name string)
ReportKeyName returns the name of key on S3, Azure-Blob without extention
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) 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
type VulnInfo ¶ added in v0.2.0
type VulnInfo struct { CveID string Packages PackageInfoList DistroAdvisories []DistroAdvisory // for Aamazon, RHEL, FreeBSD CpeNames []string }
VulnInfo holds a vulnerability information and unsecure packages