Documentation ¶
Index ¶
- func GetFixableVulnCount(cli *client.Client, i images.ImageFinding) int
- func GetScanHistory(cli *client.Client, registry, image, tag string) []images.ScanHistoryFinding
- func GetTags(cli *client.Client, image images.Image, q chan images.Tag)
- func GetTemplate(regData, topData string) string
- func Handler(w http.ResponseWriter, r *http.Request)
- func MapContainerToImage(cl containers.Containers, i images.ImageFinding) bool
- func MapImageToRegistry(rl []registries.RegistryFinding, il []images.ImageFinding)
- func TagHandler(w http.ResponseWriter, r *http.Request)
- type Finding
- type RepositoryHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFixableVulnCount ¶
func GetFixableVulnCount(cli *client.Client, i images.ImageFinding) int
GetFixableVulnCount - updates the ImageFinding.FixVersion by looping through the images vulnerabilities Param: cli: *client.Client - The aqua-sdk-go client Param: i: ImageFinding - The image response object Return: int - The FixVersion count
func GetScanHistory ¶
func GetScanHistory(cli *client.Client, registry, image, tag string) []images.ScanHistoryFinding
GetScanHistory calls the aqua-sdk-go GetScanHistory call Param: cli: *client.Client - Aqua client from aqua-sdk-go Param: registry: string - Name of the Aqua configured registry Param: image: string - Name of the image to retrieve scan history Param: tag: string - Image tag Return: []ScanHistoryFinding - slice of ScanHistoryFinding struct for the image
func GetTemplate ¶
GetTemplate retrieves the final HTML to be written Param: regData: string - The 'registries: []' data to be replaced Param: topData: string - The 'images: []' data to be replaced Return: string - the findings HTML string
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request)
Handler needs to handle the incoming request and execute the finding report generation Param: http.ResponseWriter - writer to send back to requester Param: *http.Request - request
func MapContainerToImage ¶
func MapContainerToImage(cl containers.Containers, i images.ImageFinding) bool
MapContainerToImage associates a running container with an image Param: cl: containers.Containers - slice of running containers Param: i: images.ImageFinding - the image to map Return: bool - the value of Running
func MapImageToRegistry ¶
func MapImageToRegistry(rl []registries.RegistryFinding, il []images.ImageFinding)
MapImageToRegistry associates the images to their registry Param: rl: []registries.RegistryFinding - slice of Registry objects Param: il: []images.ImageFinding - slice of Images
func TagHandler ¶
func TagHandler(w http.ResponseWriter, r *http.Request)
TagHandler receives the http request, collects the tag history for all images and returns status to requester
Types ¶
type Finding ¶
func (*Finding) Get ¶
Get - generate the finding report Param: map[string]string - Map of request parameters Param: chan reports.Response - Channel that accepts the JSON response from each finding (TODO) Return: reports.Response - the Json response sent to the requester
func (Finding) ProcessImage ¶
func (f Finding) ProcessImage(cli *client.Client, i imagessdk.Image, q chan images.ImageFinding, cl containers.Containers)
ProcessImage creates an ImageFinding object and sends it to the channel Param: cli: *client.Client - The client from aqua-sdk-go Param: i: SingleResponse - The image response object from the client Param: q: chan ImageFinding - The queue that receives the ImageFinding object Param: cl: Containers - This slice of containers to map is_running