reports

package
v0.0.0-...-c7f552b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2020 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(w http.ResponseWriter, r *http.Request)

All - This is the HTTP Handler to display the HTML Report and JSON output

func AllParams

func AllParams(w http.ResponseWriter, r *http.Request)

AllParams - This is the HTTP Handler to display the HTML Report and JSON output

func AllStream

func AllStream(w http.ResponseWriter, r *http.Request)

AllStream - Stream results instead of JSON return

func CreateScanReport

func CreateScanReport(csp aqua.CSP, list []aqua.ImageList, repoCount, remain, pagesize, page int)

CreateScanReport - iterates through the slice of ImageList Call this using a go routine so it can parse all images when greater than the pagesize

func One

func One(w http.ResponseWriter, r *http.Request)

One - Get one image

func Overview

func Overview(w http.ResponseWriter, r *http.Request)

Overview - Executive Dashboard

func Post

func Post(w http.ResponseWriter, r *http.Request)

Post - Take a list of images and get their risk

func RunningTime

func RunningTime(s string) (string, time.Time)

RunningTime - Start the Timer

func Track

func Track(s string, startTime time.Time)

Track - Stop the Timer

Types

type ImageResponse

type ImageResponse struct {
	Name        string `json:"image"`
	Tag         string `json:"tag"`
	Registry    string `json:"registry"`
	URL         string `json:"url"`
	WriteStatus string `json:"write-status,omitempty"`
}

ImageResponse for returning status of report creation

type ImageResponseList

type ImageResponseList struct {
	Count    int             `json:"count,omitempty"`
	Response []ImageResponse `json:"response"`
}

ImageResponseList for returning all report status

type OverviewResponse

type OverviewResponse struct {
	Containers struct {
		Running      int `json:"running"`
		Unregistered int `json:"unregistered"`
	} `json:"containers"`
	Enforcers struct {
		Count int `json:"count"`
	} `json:"enforcers"`
	Images struct {
		Count    int `json:"count"`
		Critical int `json:"critical"`
		High     int `json:"high"`
		Medium   int `json:"medium"`
		Low      int `json:"low"`
		Ok       int `json:"ok"`
	} `json:"images"`
	Vulnerabilities struct {
		Count    int `json:"count"`
		Critical int `json:"critical"`
		High     int `json:"high"`
		Medium   int `json:"medium"`
		Low      int `json:"low"`
	} `json:"vulnerabilities"`
	Assurance struct {
		Count    int `json:"count"`
		Image    int `json:"image,omitempty"`
		Function int `json:"function,omitempty"`
		Host     int `json:"host,omitempty"`
		PCF      int `json:"pcf,omitempty"`
	} `json:"assurance"`
}

OverviewResponse for returning status of report creation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL