Documentation
¶
Index ¶
- type AttackChainNode
- type AttackChainNodeControlsRelation
- type AttackChainNodeImageScanRelation
- type AttackChainNodeRelatedResourcesRelation
- type AttackChainNodeRelation
- type BaseModel
- type BaseReport
- type ContextualVulnerabilityFinding
- type Vulnerability
- type VulnerabilityFinding
- type VulnerabilityScanSummary
- type VulnerabilitySeverityStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttackChainNode ¶ added in v0.0.205
type AttackChainNode struct {
gorm.Model // ID, CreatedAt, UpdatedAt, DeletedAt - ID is required for linking nodes
Name string `gorm:"not null"`
Description *string `gorm:"type:varchar(255)" `
AttackChainID string `gorm:"not null"` // hash of cluster/resourceID
CustomerGUID string `gorm:"not null"`
IsRoot bool `gorm:"not null"`
}
func (AttackChainNode) TableName ¶ added in v0.0.205
func (AttackChainNode) TableName() string
type AttackChainNodeControlsRelation ¶ added in v0.0.205
type AttackChainNodeControlsRelation struct {
BaseModel
NodeID uint `gorm:"primaryKey; not null"`
Node AttackChainNode `gorm:"foreignKey:NodeID"`
// ControlID = failed or ignored control ID that is associated with the node.
ControlID string `gorm:"primaryKey; type:varchar(255);not null"`
}
func (AttackChainNodeControlsRelation) TableName ¶ added in v0.0.205
func (AttackChainNodeControlsRelation) TableName() string
type AttackChainNodeImageScanRelation ¶ added in v0.0.205
type AttackChainNodeImageScanRelation struct {
BaseModel
NodeID uint `gorm:"primaryKey; not null"`
Node AttackChainNode `gorm:"foreignKey:NodeID"`
// ImageScanId = hash of customerGUID, cluster, containerSpecID
// Should be used instead of ContainersScanID
ImageScanId string `gorm:"primaryKey; not null"`
}
func (AttackChainNodeImageScanRelation) TableName ¶ added in v0.0.205
func (AttackChainNodeImageScanRelation) TableName() string
type AttackChainNodeRelatedResourcesRelation ¶ added in v0.0.205
type AttackChainNodeRelatedResourcesRelation struct {
BaseModel
NodeID uint `gorm:"primaryKey; not null"`
Node AttackChainNode `gorm:"foreignKey:NodeID"`
ResourceID string `gorm:"primaryKey; not null"`
}
func (AttackChainNodeRelatedResourcesRelation) TableName ¶ added in v0.0.205
func (AttackChainNodeRelatedResourcesRelation) TableName() string
type AttackChainNodeRelation ¶ added in v0.0.205
type AttackChainNodeRelation struct {
BaseModel
ParentNode AttackChainNode `gorm:"foreignKey:ParentNodeID"`
ParentNodeID uint `gorm:"primaryKey; not null"`
ChildNode AttackChainNode `gorm:"foreignKey:ChildNodeID"`
ChildNodeID uint `gorm:"primaryKey; not null"`
}
func (AttackChainNodeRelation) TableName ¶ added in v0.0.205
func (AttackChainNodeRelation) TableName() string
type BaseReport ¶ added in v0.0.212
type BaseReport struct {
// Total number of chunks expected. Will be populated with the (ReportNumber of the LastReport + 1) (IsLastReport == true)
// If not known yet (i.e. IsLastReport not recieved yet), will be set to -1
TotalChunksExpected int
//specify the total number of chunks recieved so far - will be increment by one on each chunk recieved.
TotalChunksRecieved int
// set to True when TotalChunksExpected == TotalChunksRecieved
Completed bool
}
type ContextualVulnerabilityFinding ¶ added in v0.0.182
type ContextualVulnerabilityFinding struct {
VulnerabilityFinding `gorm:"embedded"`
VulnerabilityScanSummary VulnerabilityScanSummary `gorm:"foreignKey:ImageScanId"`
}
ContextualVulnerabilityFinding is a VulnerabilityFinding with a VulnerabilityScanSummary, do not auto-migrate it uses only for retreiving data from db
func (ContextualVulnerabilityFinding) TableName ¶ added in v0.0.182
func (ContextualVulnerabilityFinding) TableName() string
type Vulnerability ¶
type VulnerabilityFinding ¶
type VulnerabilityFinding struct {
BaseModel
VulnerabilityName string `gorm:"primaryKey"`
Vulnerability Vulnerability `gorm:"foreignKey:VulnerabilityName"`
ImageScanId string `gorm:"primaryKey"`
Component string `gorm:"primaryKey"`
ComponentVersion string `gorm:"primaryKey"`
LayerHash string `gorm:"primaryKey"`
FixAvailable *bool
FixedInVersion string
LayerIndex *int
LayerCommand string
IsRelevant *bool
RelevantLabel string
IsIgnored *bool
IgnoreRuleIds pq.StringArray `gorm:"type:text[]"`
}
type VulnerabilityScanSummary ¶
type VulnerabilityScanSummary struct {
BaseModel
BaseReport
ScanKind string
ImageScanId string `gorm:"primaryKey"`
ContainerSpecId string
Timestamp time.Time
CustomerGuid string
Wlid string
Designators datatypes.JSON
ImageRegistry string
ImageRepository string
ImageTag string
ImageHash string
JobIds pq.StringArray `gorm:"type:text[]"`
Status string
Errors pq.StringArray `gorm:"type:text[]"`
Findings []VulnerabilityFinding `gorm:"foreignKey:ImageScanId"`
VulnerabilitySeverityStats []VulnerabilitySeverityStats `gorm:"foreignKey:ImageScanId"`
IsStub *bool // if true, this is a stub scan summary, and the actual scan summary is not yet available. Should be deleted once we have the real one.
}
type VulnerabilitySeverityStats ¶ added in v0.0.179
type VulnerabilitySeverityStats struct {
BaseModel
ImageScanId string `gorm:"primaryKey"`
Severity string `gorm:"primaryKey"`
DayDate datatypes.Date `gorm:"primaryKey"`
SeverityScore int
TotalCount int64
RCEFixCount int64
FixAvailableOfTotalCount int64
RelevantCount int64
FixAvailableForRelevantCount int64
RCECount int64
UrgentCount int64
NeglectedCount int64
HealthStatus string
}
Click to show internal directories.
Click to hide internal directories.