Documentation ¶
Index ¶
- Variables
- func GenerateDefaultTLSCertificate() error
- func GetControllerServiceClient(joinIP string, joinPort uint16) (share.ControllerScanAdapterServiceClient, error)
- func InitializeServer(config *config.ServerConfig)
- type CVSSDetails
- type Capability
- type Counter
- type HarborArtifact
- type HarborRegistry
- type Layer
- type QueueMap
- type ReportData
- type ScanReport
- type ScanRequest
- type ScanRequestQueue
- type ScanRequestReturn
- type ScannerAdapterMetadata
- type ScannerSpec
- type Vuln
Constants ¶
This section is empty.
Variables ¶
View Source
var MimeDockerIM = "application/vnd.docker.distribution.manifest.v2+json"
View Source
var MimeOCI = "application/vnd.oci.image.manifest.v1+json"
View Source
var MimeSecurityVulnReport = "application/vnd.security.vulnerability.report; version=1.1"
Functions ¶
func GenerateDefaultTLSCertificate ¶
func GenerateDefaultTLSCertificate() error
func GetControllerServiceClient ¶
func GetControllerServiceClient(joinIP string, joinPort uint16) (share.ControllerScanAdapterServiceClient, error)
func InitializeServer ¶
func InitializeServer(config *config.ServerConfig)
InitializeServer sets up the go routines and http handlers to handle requests from Harbor.
Types ¶
type CVSSDetails ¶
type Capability ¶
type HarborArtifact ¶
type HarborRegistry ¶
type ReportData ¶
type ReportData struct { sync.RWMutex ScanReports map[string]ScanReport }
type ScanReport ¶
type ScanReport struct { GeneratedAt time.Time `json:"generated_at"` Artifact HarborArtifact `json:"artifact"` Scanner ScannerSpec `json:"scanner"` Severity string `json:"severity"` Vulnerabilities []Vuln `json:"vulnerabilities"` Status int ExpirationTime time.Time }
type ScanRequest ¶
type ScanRequest struct { Registry HarborRegistry `json:"registry"` Artifact HarborArtifact `json:"artifact"` Authorization string WorkloadID string }
type ScanRequestQueue ¶
func (*ScanRequestQueue) Dequeue ¶
func (scanRequestQueue *ScanRequestQueue) Dequeue() ScanRequest
func (*ScanRequestQueue) Enqueue ¶
func (scanRequestQueue *ScanRequestQueue) Enqueue(newRequest ScanRequest)
func (*ScanRequestQueue) Length ¶
func (scanRequestQueue *ScanRequestQueue) Length() int
type ScanRequestReturn ¶
type ScanRequestReturn struct {
ID string `json:"id"`
}
type ScannerAdapterMetadata ¶
type ScannerAdapterMetadata struct { Scanner ScannerSpec `json:"scanner"` Capabilities []Capability `json:"capabilities"` Properties map[string]string `json:"properties"` }
type ScannerSpec ¶
type Vuln ¶
type Vuln struct { ID string `json:"id"` Pkg string `json:"package"` Version string `json:"version"` FixVersion string `json:"fix_version,omitempty"` Severity string `json:"severity"` Description string `json:"description"` Links []string `json:"links"` PreferredCVSS *CVSSDetails `json:"preferred_cvss,omitempty"` CweIDs []string `json:"cwe_ids,omitempty"` VendorAttributes map[string]interface{} `json:"vendor_attributes,omitempty"` }
Click to show internal directories.
Click to hide internal directories.