Documentation ¶
Index ¶
- func NewRouter(store datastore.Backend, cc clairclient.Client, imageWebhookDefaultBlock bool, ...) *httprouter.Router
- type Container
- type ContainerEnvelope
- type ContainersEnvelope
- type Crawler
- type CrawlerEnvelope
- type CrawlerMessages
- type Error
- type Image
- type ImageEnvelope
- type ImageReviewStatus
- type ImagesEnvelope
- type K8sContainers
- type K8sCrawler
- type K8sCrawlerEnvelope
- type K8sImagePolicy
- type K8sImagePolicyEnvelope
- type K8sImageSpec
- type PoliciesEnvelope
- type Policy
- type PolicyEnvelope
- type RegCrawler
- type RegCrawlerEnvelope
- type Violation
- type ViolationType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Container ¶
type Container struct { ID uint64 `json:"ID,omitempty"` Namespace string `json:"Namespace"` Cluster string `json:"Cluster"` Name string `json:"Name"` Image string `json:"Image"` ImageScanned bool `json:"ImageScanned,omitempty"` ImageID string `json:"ImageID"` ImageRegistry string `json:"ImageRegistry"` ImageRepo string `json:"ImageRepo"` ImageTag string `json:"ImageTag"` ImageDigest string `json:"ImageDigest"` ImageFeatures []clairclient.Feature `json:"Features,omitempty"` ImageViolations []Violation `json:"Violations,omitempty"` Annotations datastore.JSONMap `json:"Annotations,omitempty"` FirstSeen time.Time `json:"FirstSeen"` LastSeen time.Time `json:"LastSeen"` }
Container struct init
func ContainerFromDatabaseModel ¶
ContainerFromDatabaseModel func init
type ContainerEnvelope ¶
type ContainerEnvelope struct { Container *Container `json:"Container,omitempty"` Error *Error `json:"Error,omitempty"` }
ContainerEnvelope struct init
type ContainersEnvelope ¶
type ContainersEnvelope struct { Containers *[]*Container `json:"Containers,omitempty"` Error *Error `json:"Error,omitempty"` }
ContainersEnvelope struct init
type Crawler ¶
type Crawler struct { ID uint64 `json:"ID,omitempty"` Type string `json:"Type,omitempty"` Status string `json:"Status,omitempty"` Scan string `json:"Scan,omitempty"` Messages *datastore.CrawlerMessages `json:"Messages,omitempty"` Started time.Time `json:"Started,omitempty"` Finished time.Time `json:"Finished,omitempty"` }
Crawler struct init
func CrawlerFromDatabaseModel ¶
CrawlerFromDatabaseModel func init
type CrawlerEnvelope ¶
type CrawlerEnvelope struct { Crawler *Crawler `json:"Crawler,omitempty"` Error *Error `json:"Error,omitempty"` }
CrawlerEnvelope struct init
type CrawlerMessages ¶
type CrawlerMessages struct { Summary string `json:"Summary,omitempty"` Error string `json:"Error,omitempty"` }
CrawlerMessages struct init
type Image ¶
type Image struct { ID uint64 `json:"ID,omitempty"` TopLayer string `json:"TopLayer,omitempty"` Registry string `json:"Registry,omitempty"` Repo string `json:"Repo,omitempty"` Tag string `json:"Tag,omitempty"` Digest string `json:"Digest,omitempty"` FirstSeen time.Time `json:"FirstSeen,omitempty"` LastSeen time.Time `json:"LastSeen,omitempty"` RegistryUser string `json:"RegistryUser,omitempty"` RegistryPassword string `json:"RegistryPassword,omitempty"` Features []clairclient.Feature `json:"Features,omitempty"` Violations []Violation `json:"Violations,omitempty"` Metadata datastore.JSONMap `json:"Metadata,omitempty"` }
Image struct init
func ImageFromDatabaseModel ¶
ImageFromDatabaseModel func init
type ImageEnvelope ¶
type ImageEnvelope struct { Image *Image `json:"Image,omitempty"` Error *Error `json:"Error,omitempty"` }
ImageEnvelope struct init
type ImageReviewStatus ¶
type ImageReviewStatus struct { // Allowed indicates that all images were allowed to be run Allowed bool `json:"allowed"` // Reason should be empty unless Allowed is false in which case it // may contain a short description of what is wrong. Kubernetes // may truncate excessively long errors when displaying to the user. Reason string `json:"reason,omitempty"` }
ImageReviewStatus is the result of a port authority policy review
type ImagesEnvelope ¶
type ImagesEnvelope struct { Images *[]*Image `json:"Images,omitempty"` Error *Error `json:"Error,omitempty"` }
ImagesEnvelope struct init
type K8sContainers ¶
type K8sContainers struct {
Image string `json:"image,omitempty"`
}
K8sContainers struct init
type K8sCrawler ¶
type K8sCrawler struct { Crawler Crawler Context string `json:"Context,omitempty"` KubeConfig string `json:"KubeConfig,omitempty"` Scan bool `json:"Scan,omitempty"` MaxThreads uint `json:"MaxThreads,omitempty"` }
K8sCrawler struct init
type K8sCrawlerEnvelope ¶
type K8sCrawlerEnvelope struct { K8sCrawler *K8sCrawler `json:"K8sCrawler,omitempty"` Error *Error `json:"Error,omitempty"` }
K8sCrawlerEnvelope struct init
type K8sImagePolicy ¶
type K8sImagePolicy struct { APIVersion string `json:"apiVersion,omitempty"` Kind string `json:"kind,omitempty"` Spec *K8sImageSpec `json:"spec,omitempty"` Status *ImageReviewStatus `json:"status,omitempty"` }
K8sImagePolicy struct init
type K8sImagePolicyEnvelope ¶
type K8sImagePolicyEnvelope struct { K8sImagePolicy *K8sImagePolicy `json:"K8sImagePolicy,omitempty"` Error *Error `json:"Error,omitempty"` }
K8sImagePolicyEnvelope struct init
type K8sImageSpec ¶
type K8sImageSpec struct { Containers []K8sContainers `json:"containers,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Namespace string `json:"namespace,omitempty"` }
K8sImageSpec struct init
type PoliciesEnvelope ¶
type PoliciesEnvelope struct { Policies *[]*Policy `json:"Policies,omitempty"` Error *Error `json:"Error,omitempty"` }
PoliciesEnvelope struct init
type Policy ¶
type Policy struct { ID uint64 `json:"ID,omitempty"` Name string `json:"Name,omitempty"` AllowedRiskSeverity string `json:"AllowedRiskSeverity,omitempty"` AllowedCVENames string `json:"AllowedCVENames,omitempty"` AllowNotFixed bool `json:"AllowNotFixed"` NotAllowedCveNames string `json:"NotAllowedCveNames,omitempty"` NotAllowedOSNames string `json:"NotAllowedOSNames,omitempty"` Created time.Time `json:"Created,omitempty"` Updated time.Time `json:"Updated,omitempty"` }
Policy struct init
func PolicyFromDatabaseModel ¶
PolicyFromDatabaseModel func init
type PolicyEnvelope ¶
type PolicyEnvelope struct { Policy *Policy `json:"Policy,omitempty"` Error *Error `json:"Error,omitempty"` }
PolicyEnvelope struct init
type RegCrawler ¶
type RegCrawler struct { Crawler Crawler MaxThreads uint `json:"MaxThreads,omitempty"` Registry string `json:"Registry,omitempty"` Username string `json:"Username,omitempty"` Password string `json:"Password,omitempty"` Repos []string `json:"Repos,omitempty"` Tags []string `json:"Tags,omitempty"` }
RegCrawler struct init
type RegCrawlerEnvelope ¶
type RegCrawlerEnvelope struct { RegCrawler *RegCrawler `json:"RegCrawler,omitempty"` Error *Error `json:"Error,omitempty"` }
RegCrawlerEnvelope struct init
type Violation ¶
type Violation struct { Type ViolationType FeatureName string `json:"FeatureName,omitempty"` FeatureVersion string `json:"FeatureVersion,omitempty"` Vulnerability clairclient.Vulnerability }
Violation struct init
type ViolationType ¶
type ViolationType string
ViolationType string init
const ( // BlacklistedOsViolation const init BlacklistedOsViolation ViolationType = "BlacklistedOs" // BlacklistedCveViolation const init BlacklistedCveViolation ViolationType = "BlacklistedCve" // BasicViolation const init BasicViolation ViolationType = "Basic" )