Documentation ¶
Index ¶
- Constants
- func AddRegistryCredential(clientConfiguration *Config, registryURL string, repository string, ...) (gorequest.Response, []byte, []error)
- func AnalyzeImage(clientConfiguration *Config, analyzeRequest anchore.ImageScanRequest) error
- func ExtractRegistryFromURL(registryURL string) (string, error)
- func GetImage(clientConfiguration *Config, digest string, retryCount int) (anchore.Image, error)
- func GetImageVulnerabilities(clientConfiguration *Config, digest string, filterIgnored bool, retryCount int) (anchore.ImageVulnerabilityReport, error)
- func GetVulnDBUpdateTime(clientConfiguration *Config) (time.Time, error)
- func GetVulnerabilityDescriptions(clientConfiguration *Config, vulns *[]anchore.NamespacedVulnerability) error
- func QueryVulnerabilityRecords(clientConfiguration *Config, ids []string, namespaces []string) (anchore.VulnerabilityQueryResults, []error)
- func RegistryNameFromRepo(registryURL string, repository string) (string, error)
- func StringToTime(timestampString string) (time.Time, error)
- func UpdateRegistryCredential(clientConfiguration *Config, registryURL string, repository string, ...) (gorequest.Response, []byte, []error)
- type AnchoreVersion
- type Config
Constants ¶
View Source
const ( CHUNKSIZE = 100 NVDFEEDGROUP = "nvdv2:cves" RegistryCredentialUpdateRequestTemplate = `{"registry": "%v", "registry_user": "%v", "registry_pass": "%v", "registry_verify": %v, "registry_type": "docker_v2"}` // #nosec G101 AddImageURL = "/images" GetImageURLTemplate = "/images/%s" GetImageVulnerabilitiesURLTemplate = "/images/%s/vuln/all" QueryVulnerabilitiesURLTemplate = "/query/vulnerabilities" RegistriesCollectionURL = "/registries" RegistryCredentialUpdateURLTemplate = "/registries/%s" // #nosec G101 FeedsURL = "/system/feeds" VersionURL = "/version" )
Variables ¶
This section is empty.
Functions ¶
func AddRegistryCredential ¶
func AddRegistryCredential( clientConfiguration *Config, registryURL string, repository string, username string, password string, registryTLSVerify bool, validateCreds bool, ) (gorequest.Response, []byte, []error)
Add a new registry credential to anchore
func AnalyzeImage ¶
func AnalyzeImage(clientConfiguration *Config, analyzeRequest anchore.ImageScanRequest) error
func ExtractRegistryFromURL ¶ added in v1.2.0
Process the registry URL to return only the hostname and port as docker pull strings support
func GetImageVulnerabilities ¶
func GetImageVulnerabilities( clientConfiguration *Config, digest string, filterIgnored bool, retryCount int, ) (anchore.ImageVulnerabilityReport, error)
Retrieve the vulnerabilities
func GetVulnDBUpdateTime ¶ added in v1.2.0
func GetVulnerabilityDescriptions ¶
func GetVulnerabilityDescriptions(clientConfiguration *Config, vulns *[]anchore.NamespacedVulnerability) error
Updates the Description fields in the input array of Description objects
func QueryVulnerabilityRecords ¶
func QueryVulnerabilityRecords( clientConfiguration *Config, ids []string, namespaces []string, ) (anchore.VulnerabilityQueryResults, []error)
Simple query that handles pagination and returns the results
func RegistryNameFromRepo ¶
Return the registry credential entry as anchore will use it. This is the registry url minus the scheme + / + repository name
func StringToTime ¶
Get a time.Time version of a string
Types ¶
type AnchoreVersion ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.