Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateFixed(Fixes []FixedIn) int
- func GenerateBogusHash(context map[string]string) string
- func GenerateContainerScanLayer(layer *ScanResultLayer, generateVuln func(*Vulnerability) error)
- func GenerateVulnerability(v *Vulnerability) error
- func GenerateVulnerabilityNoRCEAndFixed(v *Vulnerability) error
- func GenerateVulnerabilityNoRCENoFixed(v *Vulnerability) error
- func GenerateVulnerabilityRCEAndFixed(v *Vulnerability) error
- func GenerateVulnerabilityRCENotFixed(v *Vulnerability) error
- func GenerateWorkloadHash(context map[string]string) string
- func GetVulnLink(vulName string) string
- func SeverityScoreToString(score int) string
- type CommonContainerScanSeveritySummary
- type CommonContainerScanSummaryResult
- func (summary *CommonContainerScanSummaryResult) GetApiVersion() string
- func (summary *CommonContainerScanSummaryResult) GetClusterName() string
- func (summary *CommonContainerScanSummaryResult) GetClusterShortName() string
- func (summary *CommonContainerScanSummaryResult) GetContainerName() string
- func (summary *CommonContainerScanSummaryResult) GetContainerScanID() string
- func (summary *CommonContainerScanSummaryResult) GetContext() []identifiers.ArmoContext
- func (summary *CommonContainerScanSummaryResult) GetCustomerGUID() string
- func (summary *CommonContainerScanSummaryResult) GetDesignators() identifiers.PortalDesignator
- func (summary *CommonContainerScanSummaryResult) GetHasRelevancyData() bool
- func (summary *CommonContainerScanSummaryResult) GetImageID() string
- func (summary *CommonContainerScanSummaryResult) GetImageManifest() *ImageManifest
- func (summary *CommonContainerScanSummaryResult) GetImageTag() string
- func (summary *CommonContainerScanSummaryResult) GetImageTageSuffix() string
- func (summary *CommonContainerScanSummaryResult) GetJobIDs() []string
- func (summary *CommonContainerScanSummaryResult) GetNamespace() string
- func (summary *CommonContainerScanSummaryResult) GetRegistry() string
- func (summary *CommonContainerScanSummaryResult) GetRelevantLabel() RelevantLabel
- func (summary *CommonContainerScanSummaryResult) GetRepository() string
- func (summary *CommonContainerScanSummaryResult) GetSeveritiesStats() []SeverityStats
- func (summary *CommonContainerScanSummaryResult) GetSeverityStats() SeverityStats
- func (summary *CommonContainerScanSummaryResult) GetStatus() string
- func (summary *CommonContainerScanSummaryResult) GetTimestamp() int64
- func (summary *CommonContainerScanSummaryResult) GetVersion() string
- func (summary *CommonContainerScanSummaryResult) GetWLID() string
- func (summary *CommonContainerScanSummaryResult) SetApiVersion(apiVersion string)
- func (summary *CommonContainerScanSummaryResult) SetClusterName(clusterName string)
- func (summary *CommonContainerScanSummaryResult) SetClusterShortName(clusterShortName string)
- func (summary *CommonContainerScanSummaryResult) SetContainerName(containerName string)
- func (summary *CommonContainerScanSummaryResult) SetContainerScanID(containerScanID string)
- func (summary *CommonContainerScanSummaryResult) SetContext(context []identifiers.ArmoContext)
- func (summary *CommonContainerScanSummaryResult) SetCustomerGUID(customerGUID string)
- func (summary *CommonContainerScanSummaryResult) SetDesignators(designators identifiers.PortalDesignator)
- func (summary *CommonContainerScanSummaryResult) SetHasRelevancyData(hasRelevancy bool)
- func (summary *CommonContainerScanSummaryResult) SetImageID(imageID string)
- func (summary *CommonContainerScanSummaryResult) SetImageManifest(imageManifest *ImageManifest)
- func (summary *CommonContainerScanSummaryResult) SetImageTag(imageTag string)
- func (summary *CommonContainerScanSummaryResult) SetImageTageSuffix(imageTageSuffix string)
- func (summary *CommonContainerScanSummaryResult) SetNamespace(namespace string)
- func (summary *CommonContainerScanSummaryResult) SetRegistry(registry string)
- func (summary *CommonContainerScanSummaryResult) SetRelevantLabel(label RelevantLabel)
- func (summary *CommonContainerScanSummaryResult) SetSeveritiesStats(severitiesStats []SeverityStats)
- func (summary *CommonContainerScanSummaryResult) SetSeverityStats(severityStats SeverityStats)
- func (summary *CommonContainerScanSummaryResult) SetStatus(status string)
- func (summary *CommonContainerScanSummaryResult) SetTimestamp(timestamp int64)
- func (summary *CommonContainerScanSummaryResult) SetVersion(version string)
- func (summary *CommonContainerScanSummaryResult) SetWLID(wlid string)
- func (summary *CommonContainerScanSummaryResult) Validate() bool
- type CommonContainerScanSummaryResultStub
- type CommonContainerVulnerabilityResult
- func (c *CommonContainerVulnerabilityResult) GetClusterShortName() string
- func (c *CommonContainerVulnerabilityResult) GetContainerScanID() string
- func (c *CommonContainerVulnerabilityResult) GetContext() []identifiers.ArmoContext
- func (c *CommonContainerVulnerabilityResult) GetDesignators() identifiers.PortalDesignator
- func (c *CommonContainerVulnerabilityResult) GetIntroducedInLayer() string
- func (c *CommonContainerVulnerabilityResult) GetIsFixed() int
- func (c *CommonContainerVulnerabilityResult) GetIsLastScan() int
- func (c *CommonContainerVulnerabilityResult) GetLayers() []ESLayer
- func (c *CommonContainerVulnerabilityResult) GetLayersNested() []ESLayer
- func (c *CommonContainerVulnerabilityResult) GetRelatedExceptions() []armotypes.VulnerabilityExceptionPolicy
- func (c *CommonContainerVulnerabilityResult) GetRelevantLabel() RelevantLabel
- func (c *CommonContainerVulnerabilityResult) GetRelevantLinks() []string
- func (c *CommonContainerVulnerabilityResult) GetTimestamp() int64
- func (c *CommonContainerVulnerabilityResult) GetVulnerability() VulnerabilityResult
- func (c *CommonContainerVulnerabilityResult) GetWLID() string
- func (c *CommonContainerVulnerabilityResult) SetClusterShortName(clusterShortName string)
- func (c *CommonContainerVulnerabilityResult) SetContainerScanID(containerScanID string)
- func (c *CommonContainerVulnerabilityResult) SetContext(context []identifiers.ArmoContext)
- func (c *CommonContainerVulnerabilityResult) SetDesignators(designators identifiers.PortalDesignator)
- func (c *CommonContainerVulnerabilityResult) SetIntroducedInLayer(introducedInLayer string)
- func (c *CommonContainerVulnerabilityResult) SetIsFixed(isFixed int)
- func (c *CommonContainerVulnerabilityResult) SetIsLastScan(isLastScan int)
- func (c *CommonContainerVulnerabilityResult) SetLayers(layers []ESLayer)
- func (c *CommonContainerVulnerabilityResult) SetLayersNested(layersNested []ESLayer)
- func (c *CommonContainerVulnerabilityResult) SetLink(link string)
- func (c *CommonContainerVulnerabilityResult) SetRelatedExceptions(relatedExceptions []armotypes.VulnerabilityExceptionPolicy)
- func (c *CommonContainerVulnerabilityResult) SetRelevantLabel(relevantLabel RelevantLabel)
- func (c *CommonContainerVulnerabilityResult) SetRelevantLinks(relevantLinks []string)
- func (c *CommonContainerVulnerabilityResult) SetTimestamp(timestamp int64)
- func (c *CommonContainerVulnerabilityResult) SetWLID(wlid string)
- type ContainerScanSummaryResult
- type ContainerScanVulnerabilityResult
- type ContainerSummmaryTimeValueCordindate
- type Coordinates
- type DesignatorsToVulnerabilityNames
- type ESLayer
- type FixedIn
- type ImageManifest
- type LayerInfo
- type LayersList
- type LinuxPackage
- type LinuxPkgs
- type PackageFile
- type PkgFiles
- type RelevantLabel
- type ScanReport
- type ScanResultLayer
- type ScanResultReport
- func (v *ScanResultReport) AsFNVHash() string
- func (scanresult *ScanResultReport) GetDesignatorsNContext() (*identifiers.PortalDesignator, []identifiers.ArmoContext)
- func (scan *ScanResultReport) NKeys() int
- func (scanresult *ScanResultReport) Summarize() *CommonContainerScanSummaryResult
- func (scanresult *ScanResultReport) ToFlatVulnerabilities() []ContainerScanVulnerabilityResult
- func (scan *ScanResultReport) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
- func (scanresult *ScanResultReport) Validate() bool
- type SeverityStats
- type SeverityTimeValue
- type ShortVulnerabilityResult
- type TimeValueCordindate
- type TopVulItem
- type VulFixes
- type VulnerabilitiesList
- type Vulnerability
- func (v *Vulnerability) GetCategories() VulnerabilityCategory
- func (v *Vulnerability) GetCoordinates() []Coordinates
- func (v *Vulnerability) GetDescription() string
- func (v *Vulnerability) GetExceptionApplied() []armotypes.VulnerabilityExceptionPolicy
- func (v *Vulnerability) GetFixes() VulFixes
- func (v *Vulnerability) GetHealthStatus() string
- func (v *Vulnerability) GetImageID() string
- func (v *Vulnerability) GetImageTag() string
- func (v *Vulnerability) GetIsRelevant() *bool
- func (v *Vulnerability) GetLink() string
- func (v *Vulnerability) GetName() string
- func (v *Vulnerability) GetNeglectedCount() int
- func (v *Vulnerability) GetPackageType() string
- func (v *Vulnerability) GetPackageVersion() string
- func (v *Vulnerability) GetRelatedPackageName() string
- func (v *Vulnerability) GetSeverity() string
- func (v *Vulnerability) GetSeverityScore() int
- func (v *Vulnerability) GetUrgentCount() int
- func (v *Vulnerability) IsRCE() bool
- func (v *Vulnerability) NKeys() int
- func (v *Vulnerability) SetCategories(categories VulnerabilityCategory)
- func (v *Vulnerability) SetCoordinates(coordinates []Coordinates)
- func (v *Vulnerability) SetDescription(description string)
- func (v *Vulnerability) SetExceptionApplied(exceptionApplied []armotypes.VulnerabilityExceptionPolicy)
- func (v *Vulnerability) SetFixes(fixes VulFixes)
- func (v *Vulnerability) SetHealthStatus(healthStatus string)
- func (v *Vulnerability) SetImageID(ImageID string)
- func (v *Vulnerability) SetImageTag(ImageTag string)
- func (v *Vulnerability) SetIsRelevant(isRelevant *bool)
- func (v *Vulnerability) SetLink(link string)
- func (v *Vulnerability) SetName(name string)
- func (v *Vulnerability) SetNeglectedCount(neglectedCount int)
- func (v *Vulnerability) SetPackageType(packageType string)
- func (v *Vulnerability) SetPackageVersion(packageVersion string)
- func (v *Vulnerability) SetRelatedPackageName(relatedPackageName string)
- func (v *Vulnerability) SetSeverity(severity string)
- func (v *Vulnerability) SetSeverityScore(severityScore int)
- func (v *Vulnerability) SetUrgentCount(urgentCount int)
- func (longVul *Vulnerability) ToShortVulnerabilityResult() *ShortVulnerabilityResult
- func (v *Vulnerability) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
- type VulnerabilityCategory
- type VulnerabilityResult
Constants ¶
const ( //defines Relevancy as enum-like Unknown = "Unknown" Relevant = "Relevant" Irelevant = "Irelevant" NoSP = "No signature profile to compare" //Clair Severities UnknownSeverity = "Unknown" NegligibleSeverity = "Negligible" LowSeverity = "Low" MediumSeverity = "Medium" HighSeverity = "High" CriticalSeverity = "Critical" ContainerScanRedisPrefix = "_containerscan" UnknownScore = 1 NegligibleScore = 100 LowScore = 200 MediumScore = 300 HighScore = 400 CriticalScore = 500 )
Variables ¶
var KnownSeverities = map[string]bool{ UnknownSeverity: true, NegligibleSeverity: true, LowSeverity: true, MediumSeverity: true, HighSeverity: true, CriticalSeverity: true, }
var SeverityStr2Score = map[string]int{
"Unknown": 1,
"Negligible": 100,
"Low": 200,
"Medium": 300,
"High": 400,
"Critical": 500,
}
Functions ¶
func CalculateFixed ¶
func GenerateBogusHash ¶
GenerateBogusHash - generate the old (bogus) hash for the workload
func GenerateContainerScanLayer ¶
func GenerateContainerScanLayer(layer *ScanResultLayer, generateVuln func(*Vulnerability) error)
GenerateContainerScanLayer - generate a layer with random vuls
func GenerateVulnerability ¶
func GenerateVulnerability(v *Vulnerability) error
GenerateVulnerability - generate a vul (just diff "cve"'s)
func GenerateVulnerabilityNoRCEAndFixed ¶
func GenerateVulnerabilityNoRCEAndFixed(v *Vulnerability) error
func GenerateVulnerabilityNoRCENoFixed ¶
func GenerateVulnerabilityNoRCENoFixed(v *Vulnerability) error
func GenerateVulnerabilityRCEAndFixed ¶
func GenerateVulnerabilityRCEAndFixed(v *Vulnerability) error
func GenerateVulnerabilityRCENotFixed ¶
func GenerateVulnerabilityRCENotFixed(v *Vulnerability) error
func GenerateWorkloadHash ¶
GenerateWorkloadHash - generate a hash for the workload
func GetVulnLink ¶ added in v0.0.286
func SeverityScoreToString ¶ added in v0.0.227
Types ¶
type CommonContainerScanSeveritySummary ¶
type CommonContainerScanSeveritySummary struct { Designators identifiers.PortalDesignator `json:"designators"` SeverityStats ImgTag string `json:"imageTag"` ContainerName string `json:"containerName"` CustomerGUID string `json:"customerGUID"` ContainerScanID string `json:"containersScanID"` DayDate string `json:"dayDate"` WLID string `json:"wlid"` Version string `json:"version"` ImgHash string `json:"imageHash"` Cluster string `json:"cluster"` Namespace string `json:"namespace"` VersionImage string `json:"versionImage"` Status string `json:"status"` Registry string `json:"registry"` JobIDs []string `json:"jobIDs"` Context []identifiers.ArmoContext `json:"context"` Timestamp int64 `json:"timestamp"` }
type CommonContainerScanSummaryResult ¶
type CommonContainerScanSummaryResult struct { Designators identifiers.PortalDesignator `json:"designators"` SeverityStats Version string `json:"version"` Registry string `json:"registry"` CustomerGUID string `json:"customerGUID"` ContainerScanID string `json:"containersScanID"` ImageSignatureValidationError string `json:"imageSignatureValidationError,omitempty"` WLID string `json:"wlid"` ImageID string `json:"imageHash"` ImageTag string `json:"imageTag"` ClusterName string `json:"cluster"` ClusterShortName string `json:"clusterShortName"` Namespace string `json:"namespace"` ApiVersion string `json:"apiVersion"` ContainerName string `json:"containerName"` ImageTagSuffix string `json:"versionImage"` Status string `json:"status"` ExcludedSeveritiesStats []SeverityStats `json:"excludedSeveritiesStats,omitempty"` PackagesName []string `json:"packages"` SeveritiesStats []SeverityStats `json:"severitiesStats"` JobIDs []string `json:"jobIDs"` Vulnerabilities []ShortVulnerabilityResult `json:"vulnerabilities"` Context []identifiers.ArmoContext `json:"context"` Timestamp int64 `json:"timestamp"` ImageSignatureValid bool `json:"imageSignatureValid,omitempty"` ImageHasSignature bool `json:"imageHasSignature,omitempty"` RelevantLabel RelevantLabel `json:"relevantLabel"` HasRelevancyData bool `json:"hasRelevancyData"` ImageManifest *ImageManifest `json:"imageManifest,omitempty"` }
func (*CommonContainerScanSummaryResult) GetApiVersion ¶ added in v0.0.294
func (summary *CommonContainerScanSummaryResult) GetApiVersion() string
func (*CommonContainerScanSummaryResult) GetClusterName ¶
func (summary *CommonContainerScanSummaryResult) GetClusterName() string
func (*CommonContainerScanSummaryResult) GetClusterShortName ¶
func (summary *CommonContainerScanSummaryResult) GetClusterShortName() string
func (*CommonContainerScanSummaryResult) GetContainerName ¶
func (summary *CommonContainerScanSummaryResult) GetContainerName() string
func (*CommonContainerScanSummaryResult) GetContainerScanID ¶
func (summary *CommonContainerScanSummaryResult) GetContainerScanID() string
func (*CommonContainerScanSummaryResult) GetContext ¶
func (summary *CommonContainerScanSummaryResult) GetContext() []identifiers.ArmoContext
func (*CommonContainerScanSummaryResult) GetCustomerGUID ¶
func (summary *CommonContainerScanSummaryResult) GetCustomerGUID() string
func (*CommonContainerScanSummaryResult) GetDesignators ¶
func (summary *CommonContainerScanSummaryResult) GetDesignators() identifiers.PortalDesignator
func (*CommonContainerScanSummaryResult) GetHasRelevancyData ¶
func (summary *CommonContainerScanSummaryResult) GetHasRelevancyData() bool
func (*CommonContainerScanSummaryResult) GetImageID ¶
func (summary *CommonContainerScanSummaryResult) GetImageID() string
func (*CommonContainerScanSummaryResult) GetImageManifest ¶ added in v0.0.416
func (summary *CommonContainerScanSummaryResult) GetImageManifest() *ImageManifest
func (*CommonContainerScanSummaryResult) GetImageTag ¶
func (summary *CommonContainerScanSummaryResult) GetImageTag() string
func (*CommonContainerScanSummaryResult) GetImageTageSuffix ¶
func (summary *CommonContainerScanSummaryResult) GetImageTageSuffix() string
func (*CommonContainerScanSummaryResult) GetJobIDs ¶
func (summary *CommonContainerScanSummaryResult) GetJobIDs() []string
func (*CommonContainerScanSummaryResult) GetNamespace ¶
func (summary *CommonContainerScanSummaryResult) GetNamespace() string
func (*CommonContainerScanSummaryResult) GetRegistry ¶
func (summary *CommonContainerScanSummaryResult) GetRegistry() string
func (*CommonContainerScanSummaryResult) GetRelevantLabel ¶
func (summary *CommonContainerScanSummaryResult) GetRelevantLabel() RelevantLabel
func (*CommonContainerScanSummaryResult) GetRepository ¶
func (summary *CommonContainerScanSummaryResult) GetRepository() string
func (*CommonContainerScanSummaryResult) GetSeveritiesStats ¶
func (summary *CommonContainerScanSummaryResult) GetSeveritiesStats() []SeverityStats
func (*CommonContainerScanSummaryResult) GetSeverityStats ¶
func (summary *CommonContainerScanSummaryResult) GetSeverityStats() SeverityStats
func (*CommonContainerScanSummaryResult) GetStatus ¶
func (summary *CommonContainerScanSummaryResult) GetStatus() string
func (*CommonContainerScanSummaryResult) GetTimestamp ¶
func (summary *CommonContainerScanSummaryResult) GetTimestamp() int64
func (*CommonContainerScanSummaryResult) GetVersion ¶
func (summary *CommonContainerScanSummaryResult) GetVersion() string
func (*CommonContainerScanSummaryResult) GetWLID ¶
func (summary *CommonContainerScanSummaryResult) GetWLID() string
func (*CommonContainerScanSummaryResult) SetApiVersion ¶ added in v0.0.294
func (summary *CommonContainerScanSummaryResult) SetApiVersion(apiVersion string)
func (*CommonContainerScanSummaryResult) SetClusterName ¶
func (summary *CommonContainerScanSummaryResult) SetClusterName(clusterName string)
func (*CommonContainerScanSummaryResult) SetClusterShortName ¶
func (summary *CommonContainerScanSummaryResult) SetClusterShortName(clusterShortName string)
func (*CommonContainerScanSummaryResult) SetContainerName ¶
func (summary *CommonContainerScanSummaryResult) SetContainerName(containerName string)
func (*CommonContainerScanSummaryResult) SetContainerScanID ¶
func (summary *CommonContainerScanSummaryResult) SetContainerScanID(containerScanID string)
func (*CommonContainerScanSummaryResult) SetContext ¶
func (summary *CommonContainerScanSummaryResult) SetContext(context []identifiers.ArmoContext)
func (*CommonContainerScanSummaryResult) SetCustomerGUID ¶
func (summary *CommonContainerScanSummaryResult) SetCustomerGUID(customerGUID string)
func (*CommonContainerScanSummaryResult) SetDesignators ¶
func (summary *CommonContainerScanSummaryResult) SetDesignators(designators identifiers.PortalDesignator)
func (*CommonContainerScanSummaryResult) SetHasRelevancyData ¶
func (summary *CommonContainerScanSummaryResult) SetHasRelevancyData(hasRelevancy bool)
func (*CommonContainerScanSummaryResult) SetImageID ¶
func (summary *CommonContainerScanSummaryResult) SetImageID(imageID string)
func (*CommonContainerScanSummaryResult) SetImageManifest ¶ added in v0.0.416
func (summary *CommonContainerScanSummaryResult) SetImageManifest(imageManifest *ImageManifest)
func (*CommonContainerScanSummaryResult) SetImageTag ¶
func (summary *CommonContainerScanSummaryResult) SetImageTag(imageTag string)
func (*CommonContainerScanSummaryResult) SetImageTageSuffix ¶
func (summary *CommonContainerScanSummaryResult) SetImageTageSuffix(imageTageSuffix string)
func (*CommonContainerScanSummaryResult) SetNamespace ¶
func (summary *CommonContainerScanSummaryResult) SetNamespace(namespace string)
func (*CommonContainerScanSummaryResult) SetRegistry ¶
func (summary *CommonContainerScanSummaryResult) SetRegistry(registry string)
func (*CommonContainerScanSummaryResult) SetRelevantLabel ¶
func (summary *CommonContainerScanSummaryResult) SetRelevantLabel(label RelevantLabel)
func (*CommonContainerScanSummaryResult) SetSeveritiesStats ¶
func (summary *CommonContainerScanSummaryResult) SetSeveritiesStats(severitiesStats []SeverityStats)
func (*CommonContainerScanSummaryResult) SetSeverityStats ¶
func (summary *CommonContainerScanSummaryResult) SetSeverityStats(severityStats SeverityStats)
func (*CommonContainerScanSummaryResult) SetStatus ¶
func (summary *CommonContainerScanSummaryResult) SetStatus(status string)
func (*CommonContainerScanSummaryResult) SetTimestamp ¶
func (summary *CommonContainerScanSummaryResult) SetTimestamp(timestamp int64)
func (*CommonContainerScanSummaryResult) SetVersion ¶
func (summary *CommonContainerScanSummaryResult) SetVersion(version string)
func (*CommonContainerScanSummaryResult) SetWLID ¶
func (summary *CommonContainerScanSummaryResult) SetWLID(wlid string)
func (*CommonContainerScanSummaryResult) Validate ¶
func (summary *CommonContainerScanSummaryResult) Validate() bool
type CommonContainerScanSummaryResultStub ¶
type CommonContainerScanSummaryResultStub struct { CommonContainerScanSummaryResult `json:",inline"` IsStub bool `json:"isStub,omitempty"` ErrorsList []string `json:"errors,omitempty"` }
type CommonContainerVulnerabilityResult ¶
type CommonContainerVulnerabilityResult struct { Designators identifiers.PortalDesignator `json:"designators"` IntroducedInLayer string `json:"layerHash"` WLID string `json:"wlid"` ContainerScanID string `json:"containersScanID"` Vulnerability `json:",inline"` Layers []ESLayer `json:"layers"` LayersNested []ESLayer `json:"layersNested"` Context []identifiers.ArmoContext `json:"context"` RelevantLinks []string `json:"links"` RelatedExceptions []armotypes.VulnerabilityExceptionPolicy `json:"relatedExceptions,omitempty"` Timestamp int64 `json:"timestamp"` IsLastScan int `json:"isLastScan"` IsFixed int `json:"isFixed"` RelevantLabel RelevantLabel `json:"relevantLabel"` ClusterShortName string `json:"clusterShortName"` }
func (*CommonContainerVulnerabilityResult) GetClusterShortName ¶
func (c *CommonContainerVulnerabilityResult) GetClusterShortName() string
func (*CommonContainerVulnerabilityResult) GetContainerScanID ¶
func (c *CommonContainerVulnerabilityResult) GetContainerScanID() string
func (*CommonContainerVulnerabilityResult) GetContext ¶
func (c *CommonContainerVulnerabilityResult) GetContext() []identifiers.ArmoContext
func (*CommonContainerVulnerabilityResult) GetDesignators ¶
func (c *CommonContainerVulnerabilityResult) GetDesignators() identifiers.PortalDesignator
func (*CommonContainerVulnerabilityResult) GetIntroducedInLayer ¶
func (c *CommonContainerVulnerabilityResult) GetIntroducedInLayer() string
func (*CommonContainerVulnerabilityResult) GetIsFixed ¶
func (c *CommonContainerVulnerabilityResult) GetIsFixed() int
func (*CommonContainerVulnerabilityResult) GetIsLastScan ¶
func (c *CommonContainerVulnerabilityResult) GetIsLastScan() int
func (*CommonContainerVulnerabilityResult) GetLayers ¶
func (c *CommonContainerVulnerabilityResult) GetLayers() []ESLayer
func (*CommonContainerVulnerabilityResult) GetLayersNested ¶
func (c *CommonContainerVulnerabilityResult) GetLayersNested() []ESLayer
func (*CommonContainerVulnerabilityResult) GetRelatedExceptions ¶
func (c *CommonContainerVulnerabilityResult) GetRelatedExceptions() []armotypes.VulnerabilityExceptionPolicy
func (*CommonContainerVulnerabilityResult) GetRelevantLabel ¶
func (c *CommonContainerVulnerabilityResult) GetRelevantLabel() RelevantLabel
func (*CommonContainerVulnerabilityResult) GetRelevantLinks ¶
func (c *CommonContainerVulnerabilityResult) GetRelevantLinks() []string
func (*CommonContainerVulnerabilityResult) GetTimestamp ¶
func (c *CommonContainerVulnerabilityResult) GetTimestamp() int64
func (*CommonContainerVulnerabilityResult) GetVulnerability ¶
func (c *CommonContainerVulnerabilityResult) GetVulnerability() VulnerabilityResult
func (*CommonContainerVulnerabilityResult) GetWLID ¶
func (c *CommonContainerVulnerabilityResult) GetWLID() string
func (*CommonContainerVulnerabilityResult) SetClusterShortName ¶
func (c *CommonContainerVulnerabilityResult) SetClusterShortName(clusterShortName string)
func (*CommonContainerVulnerabilityResult) SetContainerScanID ¶
func (c *CommonContainerVulnerabilityResult) SetContainerScanID(containerScanID string)
func (*CommonContainerVulnerabilityResult) SetContext ¶
func (c *CommonContainerVulnerabilityResult) SetContext(context []identifiers.ArmoContext)
func (*CommonContainerVulnerabilityResult) SetDesignators ¶
func (c *CommonContainerVulnerabilityResult) SetDesignators(designators identifiers.PortalDesignator)
func (*CommonContainerVulnerabilityResult) SetIntroducedInLayer ¶
func (c *CommonContainerVulnerabilityResult) SetIntroducedInLayer(introducedInLayer string)
func (*CommonContainerVulnerabilityResult) SetIsFixed ¶
func (c *CommonContainerVulnerabilityResult) SetIsFixed(isFixed int)
func (*CommonContainerVulnerabilityResult) SetIsLastScan ¶
func (c *CommonContainerVulnerabilityResult) SetIsLastScan(isLastScan int)
func (*CommonContainerVulnerabilityResult) SetLayers ¶
func (c *CommonContainerVulnerabilityResult) SetLayers(layers []ESLayer)
func (*CommonContainerVulnerabilityResult) SetLayersNested ¶
func (c *CommonContainerVulnerabilityResult) SetLayersNested(layersNested []ESLayer)
func (*CommonContainerVulnerabilityResult) SetLink ¶ added in v0.0.286
func (c *CommonContainerVulnerabilityResult) SetLink(link string)
func (*CommonContainerVulnerabilityResult) SetRelatedExceptions ¶
func (c *CommonContainerVulnerabilityResult) SetRelatedExceptions(relatedExceptions []armotypes.VulnerabilityExceptionPolicy)
func (*CommonContainerVulnerabilityResult) SetRelevantLabel ¶
func (c *CommonContainerVulnerabilityResult) SetRelevantLabel(relevantLabel RelevantLabel)
func (*CommonContainerVulnerabilityResult) SetRelevantLinks ¶
func (c *CommonContainerVulnerabilityResult) SetRelevantLinks(relevantLinks []string)
func (*CommonContainerVulnerabilityResult) SetTimestamp ¶
func (c *CommonContainerVulnerabilityResult) SetTimestamp(timestamp int64)
func (*CommonContainerVulnerabilityResult) SetWLID ¶
func (c *CommonContainerVulnerabilityResult) SetWLID(wlid string)
type ContainerScanSummaryResult ¶
type ContainerScanSummaryResult interface { GetDesignators() identifiers.PortalDesignator GetContext() []identifiers.ArmoContext GetWLID() string GetImageTag() string GetImageID() string GetSeverityStats() SeverityStats GetSeveritiesStats() []SeverityStats GetClusterName() string GetClusterShortName() string GetNamespace() string GetApiVersion() string GetContainerName() string GetStatus() string GetRegistry() string GetRepository() string GetImageTageSuffix() string GetVersion() string GetCustomerGUID() string GetContainerScanID() string GetTimestamp() int64 GetJobIDs() []string GetRelevantLabel() RelevantLabel Validate() bool GetHasRelevancyData() bool GetImageManifest() *ImageManifest SetDesignators(identifiers.PortalDesignator) SetContext([]identifiers.ArmoContext) SetWLID(string) SetImageTag(string) SetImageID(string) SetSeverityStats(SeverityStats) SetSeveritiesStats([]SeverityStats) SetClusterName(string) SetClusterShortName(string) SetNamespace(string) SetContainerName(string) SetStatus(string) SetRegistry(string) SetImageTageSuffix(string) SetVersion(string) SetCustomerGUID(string) SetContainerScanID(string) SetTimestamp(int64) SetRelevantLabel(RelevantLabel) SetHasRelevancyData(bool) SetImageManifest(*ImageManifest) }
func NewContainerScanSummaryResult ¶
func NewContainerScanSummaryResult() ContainerScanSummaryResult
type ContainerScanVulnerabilityResult ¶
type ContainerScanVulnerabilityResult interface { GetDesignators() identifiers.PortalDesignator GetContext() []identifiers.ArmoContext GetWLID() string GetContainerScanID() string GetLayers() []ESLayer GetLayersNested() []ESLayer GetTimestamp() int64 GetIsLastScan() int GetIsFixed() int GetIntroducedInLayer() string GetRelevantLinks() []string GetRelatedExceptions() []armotypes.VulnerabilityExceptionPolicy GetVulnerability() VulnerabilityResult GetRelevantLabel() RelevantLabel GetClusterShortName() string SetDesignators(designators identifiers.PortalDesignator) SetContext(context []identifiers.ArmoContext) SetWLID(wlid string) SetContainerScanID(containerScanID string) SetLayers(layers []ESLayer) SetLayersNested(layersNested []ESLayer) SetTimestamp(timestamp int64) SetIsLastScan(isLastScan int) SetIsFixed(isFixed int) SetIntroducedInLayer(introducedInLayer string) SetLink(link string) SetRelevantLinks(relevantLinks []string) SetRelatedExceptions(relatedExceptions []armotypes.VulnerabilityExceptionPolicy) SetRelevantLabel(relevantLabel RelevantLabel) SetClusterShortName(clusterShortName string) }
func NewCommonContainerVulnerabilityResult ¶
func NewCommonContainerVulnerabilityResult() ContainerScanVulnerabilityResult
type ContainerSummmaryTimeValueCordindate ¶ added in v0.0.238
type ContainerSummmaryTimeValueCordindate struct { TimeValueCordindate `json:",inline"` ImageTag string `json:"imageTag"` ImageHash string `json:"imageHash"` }
type Coordinates ¶ added in v0.0.294
type DesignatorsToVulnerabilityNames ¶ added in v0.0.238
type DesignatorsToVulnerabilityNames struct { Designators identifiers.PortalDesignator `json:"designators"` VulnerabilityNames []string `json:"vulnerabilityNames"` }
type FixedIn ¶
type FixedIn struct { Name string `json:"name"` ImgTag string `json:"imageTag"` Version string `json:"version"` }
FixedIn when and which pkg was fixed (which version as well)
type ImageManifest ¶ added in v0.0.415
type LayersList ¶
type LayersList []ScanResultLayer
VulnerabilitiesList -s.e
func (*LayersList) UnmarshalJSONArray ¶
func (t *LayersList) UnmarshalJSONArray(dec *gojay.Decoder) error
type LinuxPackage ¶
type LinuxPackage struct { PackageName string `json:"packageName"` Files PkgFiles `json:"files"` PackageVersion string `json:"version"` }
LinuxPackage- Linux package representation
func (*LinuxPackage) NKeys ¶
func (file *LinuxPackage) NKeys() int
func (*LinuxPackage) UnmarshalJSONObject ¶
func (pkgnx *LinuxPackage) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
UnmarshalJSONObject--- Package
type PackageFile ¶
type PackageFile struct {
Filename string `json:"name"`
}
PackageFile - s.e
func (*PackageFile) NKeys ¶
func (file *PackageFile) NKeys() int
func (*PackageFile) UnmarshalJSONObject ¶
func (file *PackageFile) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
UnmarshalJSONObject - File inside a pkg
type RelevantLabel ¶
type RelevantLabel string
const RelevantLabelNo RelevantLabel = "no"
const RelevantLabelNotExists RelevantLabel = ""
const RelevantLabelYes RelevantLabel = "yes"
type ScanReport ¶
type ScanReport interface { IsLastReport() bool GetDesignators() identifiers.PortalDesignator GetContainerScanID() string GetTimestamp() int64 GetWorkloadHash() string GetCustomerGUID() string GetSummary() ContainerScanSummaryResult GetVulnerabilities() []ContainerScanVulnerabilityResult GetVersion() string GetPaginationInfo() apis.PaginationMarks Validate() bool SetDesignators(identifiers.PortalDesignator) SetContainerScanID(string) SetTimestamp(int64) SetWorkloadHash(string) SetCustomerGUID(string) }
type ScanResultLayer ¶
type ScanResultLayer struct { LayerHash string `json:"layerHash"` ParentLayerHash string `json:"parentLayerHash"` Vulnerabilities VulnerabilitiesList `json:"vulnerabilities"` Packages LinuxPkgs `json:"packageToFile"` }
ScanResultLayer - represents a single layer from container scan result
func (*ScanResultLayer) GetFilesByPackage ¶
func (layer *ScanResultLayer) GetFilesByPackage(pkgname string) (files *PkgFiles)
func (*ScanResultLayer) GetPackagesNames ¶
func (layer *ScanResultLayer) GetPackagesNames() []string
func (*ScanResultLayer) NKeys ¶
func (scan *ScanResultLayer) NKeys() int
func (*ScanResultLayer) UnmarshalJSONObject ¶
func (scan *ScanResultLayer) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
type ScanResultReport ¶
type ScanResultReport struct { Designators identifiers.PortalDesignator `json:"designators"` CustomerGUID string `json:"customerGUID"` ImgTag string `json:"imageTag"` ImgHash string `json:"imageHash"` WLID string `json:"wlid"` ContainerName string `json:"containerName"` Timestamp int64 `json:"timestamp"` Layers LayersList `json:"layers"` ListOfDangerousArtifcats []string `json:"listOfDangerousArtifcats"` Session apis.SessionChain `json:"session,omitempty"` ImageSignatureValid bool `json:"imageSignatureValid,omitempty"` ImageHasSignature bool `json:"imageHasSignature,omitempty"` ImageSignatureValidationError string `json:"imageSignatureValidationError,omitempty"` }
ScanResultReport - the report given from scanner to event receiver TODO: remove
func GenerateContainerScanReportMock ¶
func GenerateContainerScanReportMock(vulnGenerator func(*Vulnerability) error) ScanResultReport
GenerateContainerScanReportMock - generate a scan result
func GenerateContainerScanReportNoVulMock ¶
func GenerateContainerScanReportNoVulMock() ScanResultReport
GenerateContainerScanReportMock - generate a scan result
func (*ScanResultReport) AsFNVHash ¶
func (v *ScanResultReport) AsFNVHash() string
func (*ScanResultReport) GetDesignatorsNContext ¶
func (scanresult *ScanResultReport) GetDesignatorsNContext() (*identifiers.PortalDesignator, []identifiers.ArmoContext)
func (*ScanResultReport) NKeys ¶
func (scan *ScanResultReport) NKeys() int
func (*ScanResultReport) Summarize ¶
func (scanresult *ScanResultReport) Summarize() *CommonContainerScanSummaryResult
func (*ScanResultReport) ToFlatVulnerabilities ¶
func (scanresult *ScanResultReport) ToFlatVulnerabilities() []ContainerScanVulnerabilityResult
ToFlatVulnerabilities - returnsgit p
func (*ScanResultReport) UnmarshalJSONObject ¶
func (scan *ScanResultReport) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
func (*ScanResultReport) Validate ¶
func (scanresult *ScanResultReport) Validate() bool
type SeverityStats ¶
type SeverityStats struct { Severity string `json:"severity,omitempty"` HealthStatus string `json:"healthStatus"` TotalCount int64 `json:"total"` RCEFixCount int64 `json:"rceFixCount"` RelevantFixCount int64 `json:"relevantFixCount"` FixAvailableOfTotalCount int64 `json:"fixedTotal"` RelevantCount int64 `json:"relevantTotal"` RCECount int64 `json:"rceTotal"` UrgentCount int64 `json:"urgent"` NeglectedCount int64 `json:"neglected"` RelevancyScanCount int64 `json:"relevancyScanCount"` }
type SeverityTimeValue ¶ added in v0.0.238
type SeverityTimeValue struct { Cords []ContainerSummmaryTimeValueCordindate `json:"cords"` Severity string `json:"severity"` }
type ShortVulnerabilityResult ¶
type ShortVulnerabilityResult struct {
Name string `json:"name"`
}
type TimeValueCordindate ¶ added in v0.0.238
type TopVulItem ¶
type TopVulItem struct { Vulnerability `json:",inline"` WorkloadsCount int64 `json:"workloadsCount"` SeverityOverall int64 `json:"severityOverall"` }
type VulnerabilitiesList ¶
type VulnerabilitiesList []Vulnerability
VulnerabilitiesList -s.e
func (*VulnerabilitiesList) UnmarshalJSONArray ¶
func (t *VulnerabilitiesList) UnmarshalJSONArray(dec *gojay.Decoder) error
type Vulnerability ¶
type Vulnerability struct { IsRelevant *bool `json:"isRelevant,omitempty"` HealthStatus string `json:"healthStatus"` ImageID string `json:"imageHash"` ImageTag string `json:"imageTag"` RelatedPackageName string `json:"packageName"` PackageType string `json:"packageType"` PackageVersion string `json:"packageVersion"` Link string `json:"link"` Description string `json:"description"` Severity string `json:"severity"` Name string `json:"name"` Fixes VulFixes `json:"fixedIn"` ExceptionApplied []armotypes.VulnerabilityExceptionPolicy `json:"exceptionApplied,omitempty"` SeverityScore int `json:"severityScore"` NeglectedCount int `json:"neglected"` UrgentCount int `json:"urgent"` Categories VulnerabilityCategory `json:"categories"` Coordinates []Coordinates `json:"coordinates,omitempty"` }
Vulnerability - a vul object
func (*Vulnerability) GetCategories ¶
func (v *Vulnerability) GetCategories() VulnerabilityCategory
func (*Vulnerability) GetCoordinates ¶ added in v0.0.294
func (v *Vulnerability) GetCoordinates() []Coordinates
func (*Vulnerability) GetDescription ¶
func (v *Vulnerability) GetDescription() string
func (*Vulnerability) GetExceptionApplied ¶
func (v *Vulnerability) GetExceptionApplied() []armotypes.VulnerabilityExceptionPolicy
func (*Vulnerability) GetFixes ¶
func (v *Vulnerability) GetFixes() VulFixes
func (*Vulnerability) GetHealthStatus ¶
func (v *Vulnerability) GetHealthStatus() string
func (*Vulnerability) GetImageID ¶
func (v *Vulnerability) GetImageID() string
func (*Vulnerability) GetImageTag ¶
func (v *Vulnerability) GetImageTag() string
func (*Vulnerability) GetIsRelevant ¶
func (v *Vulnerability) GetIsRelevant() *bool
func (*Vulnerability) GetLink ¶
func (v *Vulnerability) GetLink() string
func (*Vulnerability) GetName ¶
func (v *Vulnerability) GetName() string
func (*Vulnerability) GetNeglectedCount ¶
func (v *Vulnerability) GetNeglectedCount() int
func (*Vulnerability) GetPackageType ¶ added in v0.0.294
func (v *Vulnerability) GetPackageType() string
func (*Vulnerability) GetPackageVersion ¶
func (v *Vulnerability) GetPackageVersion() string
func (*Vulnerability) GetRelatedPackageName ¶
func (v *Vulnerability) GetRelatedPackageName() string
func (*Vulnerability) GetSeverity ¶
func (v *Vulnerability) GetSeverity() string
func (*Vulnerability) GetSeverityScore ¶
func (v *Vulnerability) GetSeverityScore() int
func (*Vulnerability) GetUrgentCount ¶
func (v *Vulnerability) GetUrgentCount() int
func (*Vulnerability) IsRCE ¶
func (v *Vulnerability) IsRCE() bool
func (*Vulnerability) NKeys ¶
func (v *Vulnerability) NKeys() int
func (*Vulnerability) SetCategories ¶
func (v *Vulnerability) SetCategories(categories VulnerabilityCategory)
func (*Vulnerability) SetCoordinates ¶ added in v0.0.294
func (v *Vulnerability) SetCoordinates(coordinates []Coordinates)
func (*Vulnerability) SetDescription ¶
func (v *Vulnerability) SetDescription(description string)
func (*Vulnerability) SetExceptionApplied ¶
func (v *Vulnerability) SetExceptionApplied(exceptionApplied []armotypes.VulnerabilityExceptionPolicy)
func (*Vulnerability) SetFixes ¶
func (v *Vulnerability) SetFixes(fixes VulFixes)
func (*Vulnerability) SetHealthStatus ¶
func (v *Vulnerability) SetHealthStatus(healthStatus string)
func (*Vulnerability) SetImageID ¶
func (v *Vulnerability) SetImageID(ImageID string)
func (*Vulnerability) SetImageTag ¶
func (v *Vulnerability) SetImageTag(ImageTag string)
func (*Vulnerability) SetIsRelevant ¶
func (v *Vulnerability) SetIsRelevant(isRelevant *bool)
func (*Vulnerability) SetLink ¶
func (v *Vulnerability) SetLink(link string)
func (*Vulnerability) SetName ¶
func (v *Vulnerability) SetName(name string)
func (*Vulnerability) SetNeglectedCount ¶
func (v *Vulnerability) SetNeglectedCount(neglectedCount int)
func (*Vulnerability) SetPackageType ¶ added in v0.0.294
func (v *Vulnerability) SetPackageType(packageType string)
func (*Vulnerability) SetPackageVersion ¶
func (v *Vulnerability) SetPackageVersion(packageVersion string)
func (*Vulnerability) SetRelatedPackageName ¶
func (v *Vulnerability) SetRelatedPackageName(relatedPackageName string)
func (*Vulnerability) SetSeverity ¶
func (v *Vulnerability) SetSeverity(severity string)
func (*Vulnerability) SetSeverityScore ¶
func (v *Vulnerability) SetSeverityScore(severityScore int)
func (*Vulnerability) SetUrgentCount ¶
func (v *Vulnerability) SetUrgentCount(urgentCount int)
func (*Vulnerability) ToShortVulnerabilityResult ¶
func (longVul *Vulnerability) ToShortVulnerabilityResult() *ShortVulnerabilityResult
func (*Vulnerability) UnmarshalJSONObject ¶
func (v *Vulnerability) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)
type VulnerabilityCategory ¶
type VulnerabilityCategory struct {
IsRCE bool `json:"isRce"`
}
type VulnerabilityResult ¶
type VulnerabilityResult interface { GetName() string GetImageID() string GetImageTag() string GetRelatedPackageName() string GetPackageType() string GetPackageVersion() string GetLink() string GetDescription() string GetSeverity() string GetSeverityScore() int GetFixes() VulFixes GetIsRelevant() *bool GetUrgentCount() int GetNeglectedCount() int GetHealthStatus() string GetCategories() VulnerabilityCategory GetExceptionApplied() []armotypes.VulnerabilityExceptionPolicy GetCoordinates() []Coordinates SetName(string) SetImageID(string) SetImageTag(string) SetRelatedPackageName(string) SetPackageType(string) SetPackageVersion(string) SetLink(string) SetDescription(string) SetSeverity(string) SetSeverityScore(int) SetFixes(VulFixes) SetIsRelevant(*bool) SetUrgentCount(int) SetNeglectedCount(int) SetHealthStatus(string) SetCategories(VulnerabilityCategory) SetExceptionApplied([]armotypes.VulnerabilityExceptionPolicy) SetCoordinates([]Coordinates) }
func NewVulnerability ¶
func NewVulnerability() VulnerabilityResult
Source Files ¶
- commonContainerScanSummaryResultMethods.go
- commonContainerVulnerabilityResultMethods.go
- commonadapters.go
- commondatastructures.go
- consts.go
- containerscan_mock.go
- datastructuresmethods.go
- gojayunmarshaller.go
- image_id_parsers.go
- interfaces.go
- jsonrawscan.go
- overtime_structs.go
- rawdatastrucutres.go
- vulnerabilityMethods.go