Documentation ¶
Index ¶
- Constants
- type ClairConfig
- type ClairService
- type ClairServiceImpl
- func (impl *ClairServiceImpl) CheckIfIndexReportExistsForManifestHash(manifestHash claircore.Digest) (bool, error)
- func (impl *ClairServiceImpl) CreateClairManifest(scanEvent *common.ImageScanEvent) (*claircore.Manifest, error)
- func (impl *ClairServiceImpl) CreateIndexReportFromManifest(manifest *claircore.Manifest) error
- func (impl *ClairServiceImpl) DeleteIndexReportFromManifestHash(manifestHash claircore.Digest) error
- func (impl *ClairServiceImpl) GenerateClairManifestFromImage(image v1.Image, reference name.Reference, roundTripper http.RoundTripper) (*claircore.Manifest, error)
- func (impl *ClairServiceImpl) GetAuthenticatorByDockerRegistryId(dockerRegistryId string) (authn.Authenticator, error)
- func (impl *ClairServiceImpl) GetRoundTripper(ctx context.Context, ref string, authenticator authn.Authenticator) (http.RoundTripper, error)
- func (impl *ClairServiceImpl) GetVulnerabilityReportFromClair(scanEvent *common.ImageScanEvent) (*claircore.VulnerabilityReport, error)
- func (impl *ClairServiceImpl) GetVulnerabilityReportFromManifestHash(manifestHash claircore.Digest) (*claircore.VulnerabilityReport, error)
- func (impl *ClairServiceImpl) ScanImage(scanEvent *common.ImageScanEvent, tool *repository.ScanToolMetadata, ...) (*common.ScanEventResponse, error)
Constants ¶
View Source
const ( CLAIR_INDEX_REPORT_URL = "/indexer/api/v1/index_report" CLAIR_VULNERABILITY_REPORT_URL = "/matcher/api/v1/vulnerability_report" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClairConfig ¶
type ClairConfig struct {
ClairAddress string `env:"CLAIR_ADDR" envDefault:"http://localhost:6060"`
}
func GetClairConfig ¶
func GetClairConfig() (*ClairConfig, error)
type ClairService ¶
type ClairService interface { ScanImage(scanEvent *common.ImageScanEvent, tool *repository.ScanToolMetadata, executionHistory *repository.ImageScanExecutionHistory) (*common.ScanEventResponse, error) CheckIfIndexReportExistsForManifestHash(manifestHash claircore.Digest) (bool, error) CreateIndexReportFromManifest(manifest *claircore.Manifest) error GetVulnerabilityReportFromManifestHash(manifestHash claircore.Digest) (*claircore.VulnerabilityReport, error) DeleteIndexReportFromManifestHash(manifestHash claircore.Digest) error GetRoundTripper(ctx context.Context, ref string, authenticator authn.Authenticator) (http.RoundTripper, error) }
type ClairServiceImpl ¶
type ClairServiceImpl struct {
// contains filtered or unexported fields
}
func NewClairServiceImpl ¶
func NewClairServiceImpl(logger *zap.SugaredLogger, clairConfig *ClairConfig, httpClient *http.Client, imageScanService security.ImageScanService, dockerArtifactStoreRepository repository.DockerArtifactStoreRepository, scanToolMetadataRepository repository.ScanToolMetadataRepository) *ClairServiceImpl
func (*ClairServiceImpl) CheckIfIndexReportExistsForManifestHash ¶
func (impl *ClairServiceImpl) CheckIfIndexReportExistsForManifestHash(manifestHash claircore.Digest) (bool, error)
func (*ClairServiceImpl) CreateClairManifest ¶
func (impl *ClairServiceImpl) CreateClairManifest(scanEvent *common.ImageScanEvent) (*claircore.Manifest, error)
func (*ClairServiceImpl) CreateIndexReportFromManifest ¶
func (impl *ClairServiceImpl) CreateIndexReportFromManifest(manifest *claircore.Manifest) error
func (*ClairServiceImpl) DeleteIndexReportFromManifestHash ¶
func (impl *ClairServiceImpl) DeleteIndexReportFromManifestHash(manifestHash claircore.Digest) error
func (*ClairServiceImpl) GenerateClairManifestFromImage ¶
func (impl *ClairServiceImpl) GenerateClairManifestFromImage(image v1.Image, reference name.Reference, roundTripper http.RoundTripper) (*claircore.Manifest, error)
func (*ClairServiceImpl) GetAuthenticatorByDockerRegistryId ¶
func (impl *ClairServiceImpl) GetAuthenticatorByDockerRegistryId(dockerRegistryId string) (authn.Authenticator, error)
func (*ClairServiceImpl) GetRoundTripper ¶
func (impl *ClairServiceImpl) GetRoundTripper(ctx context.Context, ref string, authenticator authn.Authenticator) (http.RoundTripper, error)
func (*ClairServiceImpl) GetVulnerabilityReportFromClair ¶
func (impl *ClairServiceImpl) GetVulnerabilityReportFromClair(scanEvent *common.ImageScanEvent) (*claircore.VulnerabilityReport, error)
func (*ClairServiceImpl) GetVulnerabilityReportFromManifestHash ¶
func (impl *ClairServiceImpl) GetVulnerabilityReportFromManifestHash(manifestHash claircore.Digest) (*claircore.VulnerabilityReport, error)
func (*ClairServiceImpl) ScanImage ¶
func (impl *ClairServiceImpl) ScanImage(scanEvent *common.ImageScanEvent, tool *repository.ScanToolMetadata, executionHistory *repository.ImageScanExecutionHistory) (*common.ScanEventResponse, error)
Click to show internal directories.
Click to hide internal directories.