Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CVSS ¶
CVSS is a struct that represents the CVSS score.
type Config ¶
type Config struct { ExposedPorts ExposedPorts `json:"ExposedPorts" gorm:"type:jsonb"` User string `json:"User"` WorkingDir string `json:"WorkingDir"` Entrypoint []string `json:"Entrypoint" gorm:"type:text[]"` Env []string `json:"Env" gorm:"type:text[]"` }
Config represents the configuration of the container.
type CweIDs ¶
type CweIDs []string
CweIDs is a slice of strings that represents the CWE IDs.
type DataSource ¶
type DataSource struct { ID string `json:"ID" gorm:"primaryKey"` Name string `json:"Name" gorm:"primaryKey"` URL string `json:"URL" gorm:"primaryKey"` }
DataSource is a struct that represents a data source for vulnerability.
func (*DataSource) Scan ¶
func (d *DataSource) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database deserialization.
type ExposedPorts ¶
type ExposedPorts map[string]interface{}
ExposedPorts represents the exposed ports of the container.
func (*ExposedPorts) Scan ¶
func (e *ExposedPorts) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database deserialization.
type History ¶
type History struct { Author string `json:"author,omitempty"` Created string `json:"created"` CreatedBy string `json:"created_by"` Comment string `json:"comment"` EmptyLayer bool `json:"empty_layer,omitempty"` }
History represents the history of the image.
type ImageConfig ¶
type ImageConfig struct { Config Config `json:"config" gorm:"embedded"` Architecture string `json:"architecture"` Author string `json:"author"` Created string `json:"created"` OS string `json:"os"` RootFS RootFS `json:"rootfs" gorm:"embedded"` History []History `json:"history" gorm:"type:text[]"` }
ImageConfig contains the configuration details of the container image.
type JSONStringArray ¶
type JSONStringArray []string
JSONStringArray custom type for handling JSON serialization of string arrays.
func (*JSONStringArray) Scan ¶
func (j *JSONStringArray) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database deserialization.
type Metadata ¶
type Metadata struct { ImageConfig ImageConfig `json:"ImageConfig" gorm:"embedded"` OS OS `json:"OS" gorm:"embedded"` ImageID string `json:"ImageID"` DiffIDs JSONStringArray `json:"DiffIDs" gorm:"type:text"` RepoTags JSONStringArray `json:"RepoTags" gorm:"type:text"` RepoDigests JSONStringArray `json:"RepoDigests" gorm:"type:text"` }
Metadata contains additional information about the scanned artifact.
type PkgIdentifier ¶
type PkgIdentifier struct { PURL string `json:"PURL" gorm:"primaryKey"` UID string `json:"UID" gorm:"primaryKey"` }
PkgIdentifier is a struct that represents a package identifier pURL.
func (*PkgIdentifier) Scan ¶
func (p *PkgIdentifier) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database deserialization.
type References ¶
type References []string
References is a slice of strings that represents the references.
func (*References) Scan ¶
func (r *References) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database deserialization.
type RootFS ¶
type RootFS struct { Type string `json:"type"` DiffIDs []string `json:"diff_ids" gorm:"type:text[]"` }
RootFS represents the root filesystem of the image.
type Scan ¶
type Scan struct { Metadata Metadata `json:"Metadata" gorm:"embedded"` CreatedAt time.Time `json:"CreatedAt" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"UpdatedAt" gorm:"autoUpdateTime"` ArtifactName string `json:"ArtifactName"` ArtifactType string `json:"ArtifactType"` Vulnerabilities []Vulnerability `json:"Vulnerabilities" gorm:"foreignKey:ScanID"` ID uint `json:"ID" gorm:"primaryKey;autoIncrement"` SchemaVersion int `json:"SchemaVersion"` }
Scan represents the result of a vulnerability scan.
type VendorSeverity ¶
VendorSeverity is a struct that represents the vendor severity.
func (*VendorSeverity) Scan ¶
func (v *VendorSeverity) Scan(value interface{}) error
Scan implements the sql.Scanner interface for database deserialization.
type Vulnerability ¶
type Vulnerability struct { CreatedAt time.Time `json:"CreatedAt" gorm:"autoCreateTime"` LastModifiedDate time.Time `json:"LastModifiedDate" gorm:"type:timestamp"` PublishedDate time.Time `json:"PublishedDate" gorm:"type:timestamp"` UpdatedAt time.Time `json:"UpdatedAt" gorm:"autoUpdateTime"` CVSS CVSS `json:"CVSS" gorm:"type:jsonb"` VendorSeverity VendorSeverity `json:"VendorSeverity" gorm:"type:jsonb"` DataSource DataSource `json:"DataSource" gorm:"foreignKey:ID,URL;references:ID,URL"` Layer Layer `json:"Layer" gorm:"embedded"` PkgIdentifier PkgIdentifier `json:"PkgIdentifier" gorm:"foreignKey:PURL,UID;references:PURL,UID"` Description string `json:"Description"` FixedVersion string `json:"FixedVersion"` InstalledVersion string `json:"InstalledVersion"` PkgName string `json:"PkgName"` PkgPath string `json:"PkgPath"` PrimaryURL string `json:"PrimaryURL"` Severity string `json:"Severity"` SeveritySource string `json:"SeveritySource"` Status string `json:"Status"` Title string `json:"Title"` VulnerabilityID string `json:"VulnerabilityID"` Target string `json:"Target"` Class string `json:"Class"` Type string `json:"Type"` CweIDs CweIDs `json:"CweIDs" gorm:"type:text[]"` References References `json:"References" gorm:"type:text[]"` ScanID uint `json:"ScanID" gorm:"index"` // Foreign key for the Scan ID uint `gorm:"primaryKey;autoIncrement"` }
Vulnerability is a struct that represents a vulnerability.