clair

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: MIT Imports: 13 Imported by: 17

Documentation

Index

Constants

View Source
const EMPTY_LAYER_BLOB_SUM = "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Analyze(image *docker.Image) ([]*Vulnerability, error)
	Push(image *docker.Image) error
}

type Clair

type Clair struct {
	// contains filtered or unexported fields
}

Clair is representation of Clair server

func NewClair

func NewClair(url string, version int, timeout time.Duration) Clair

NewClair construct Clair entity using potentially incomplete server URL If protocol is missing HTTP will be used. If port is missing 6060 will be used

func (*Clair) Analyse

func (c *Clair) Analyse(image *docker.Image) ([]*Vulnerability, error)

Analyse sent each layer from Docker image to Clair and returns a list of found vulnerabilities

type Vulnerability

type Vulnerability struct {
	Name           string                 `json:"Name,omitempty"`
	NamespaceName  string                 `json:"NamespaceName,omitempty"`
	Description    string                 `json:"Description,omitempty"`
	Link           string                 `json:"Link,omitempty"`
	Severity       string                 `json:"Severity,omitempty"`
	Metadata       map[string]interface{} `json:"Metadata,omitempty"`
	FixedBy        string                 `json:"FixedBy,omitempty"`
	FixedIn        []feature              `json:"FixedIn,omitempty"`
	FeatureName    string                 `json:"FeatureName",omitempty`
	FeatureVersion string                 `json:"FeatureVersion",omitempty`
}

Vulnerability represents vulnerability entity returned by Clair

Jump to

Keyboard shortcuts

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