Documentation ¶
Index ¶
- func AnchoreAction(workFlows WorkflowResponse, CurrentWFDIndex int, action string)
- func CheckWorkflowID(workflowID string, workFlows WorkflowResponse) (int, bool)
- func GetAllImageAnalysis(workFlows WorkflowResponse) []byte
- func GetAnchoreInfo() map[string]string
- func GetReport(reqBytes []byte, msg *nats.Msg, natsInfo map[string]string)
- func GetWorkflowImages(workFlow workflowdefinition.WorkflowDefinition) []string
- func WorkflowDefinitionCreate(msg *stan.Msg)
- func WorkflowDefinitionFinished(msg *stan.Msg)
- type ImageReport
- type Vulnerability
- type WFDReports
- type WorkflowResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnchoreAction ¶
func AnchoreAction(workFlows WorkflowResponse, CurrentWFDIndex int, action string)
AnchoreAction will perform in action using the anchore-cli. Currently used to 'add' and 'wait' on images
func CheckWorkflowID ¶
func CheckWorkflowID(workflowID string, workFlows WorkflowResponse) (int, bool)
CheckWorkflowID Checks if workflow ID exists
func GetAllImageAnalysis ¶
func GetAllImageAnalysis(workFlows WorkflowResponse) []byte
GetAllImageAnalysis returns all the reports for all images
func GetAnchoreInfo ¶
GetAnchoreInfo returns the parameters to be used with the Anchore engine
func GetWorkflowImages ¶
func GetWorkflowImages(workFlow workflowdefinition.WorkflowDefinition) []string
GetWorkflowImages Returns a List of images in the provided Workflow
func WorkflowDefinitionCreate ¶
func WorkflowDefinitionCreate(msg *stan.Msg)
WorkflowDefinitionCreate logs when a WorkflowDefinition is created
func WorkflowDefinitionFinished ¶
func WorkflowDefinitionFinished(msg *stan.Msg)
WorkflowDefinitionFinished is used to parse through Workflow, retrieve docker image id's then analyze docker image using Anchore
Types ¶
type ImageReport ¶
type ImageReport struct { ImageID string `json:"imageID"` ImageDigest string `json:"imageDigest"` Vulnerabilities []Vulnerability `json:"vulnerabilities"` VulnerabilityType string `json:"vulnerability_type"` }
ImageReport is the vulnerability report of a single image
func GetImageAnalysis ¶
func GetImageAnalysis(Images []string) []ImageReport
GetImageAnalysis get analysis of provided image(s)
type Vulnerability ¶
type Vulnerability struct { Feed string `json:"feed"` FeedGroup string `json:"feed_group"` Fix string `json:"fix"` NvdData []nvd `json:"nvd_data"` Package string `json:"package"` PackageCPE string `json:"package_cpe"` PackageCPE23 string `json:"package_cpe23"` PackageName string `json:"package_name"` PackagePath string `json:"package_path"` PackageType string `json:"package_type"` PackageVersion string `json:"package_version"` Severity string `json:"severity"` URL string `json:"url"` VendorData []nvd `json:"vendor_data"` Vuln string `json:"vuln"` }
Vulnerability struct has metadata of found vulnerability
type WFDReports ¶
type WFDReports struct {
Reports []ImageReport
}
WFDReports has list of all reports
type WorkflowResponse ¶
type WorkflowResponse struct { Error *common.Error WorkflowDefinitions []workflowdefinition.WorkflowDefinition `json:"data"` }
WorkflowResponse struct is used to parse through PublishRequest result