Versions in this module Expand all Collapse all v1 v1.2.0 Jan 27, 2025 v1.1.0 Dec 20, 2024 Changes in this version + var ImageScanningWireSet = wire.NewSet(NewPolicyServiceImpl, wire.Bind(new(PolicyService), new(*PolicyServiceImpl)), ...) + type ImageScanDeployInfoService interface + Save func(model *repository.ImageScanDeployInfo) error + Update func(model *repository.ImageScanDeployInfo) error + type ImageScanDeployInfoServiceImpl struct + func NewImageScanDeployInfoService(logger *zap.SugaredLogger, ...) *ImageScanDeployInfoServiceImpl + func (impl *ImageScanDeployInfoServiceImpl) Save(model *repository.ImageScanDeployInfo) error + func (impl *ImageScanDeployInfoServiceImpl) Update(model *repository.ImageScanDeployInfo) error + type ImageScanService interface + FetchAllDeployInfo func(request *bean3.ImageScanRequest) ([]*repository3.ImageScanDeployInfo, error) + FetchExecutionDetailResult func(request *bean3.ImageScanRequest) (*bean3.ImageScanExecutionDetail, error) + FetchMinScanResultByAppIdAndEnvId func(request *bean3.ImageScanRequest) (*bean3.ImageScanExecutionDetail, error) + FetchScanExecutionListing func(request *bean3.ImageScanRequest, ids []int) (*bean3.ImageScanHistoryListingResponse, error) + GetArtifactVulnerabilityStatus func(ctx context.Context, request *bean2.VulnerabilityCheckRequest) (bool, error) + IsImageScanExecutionCompleted func(image, imageDigest string) (bool, error) + VulnerabilityExposure func(request *repository3.VulnerabilityRequest) (*repository3.VulnerabilityExposureListingResponse, error) + type ImageScanServiceImpl struct + Logger *zap.SugaredLogger + func NewImageScanServiceImpl(Logger *zap.SugaredLogger, ...) *ImageScanServiceImpl + func (impl *ImageScanServiceImpl) CalculateSeverityCountInfo(vulnerabilities []*bean3.Vulnerabilities) *bean3.SeverityCount + func (impl *ImageScanServiceImpl) FetchMinScanResultByAppIdAndEnvId(request *bean3.ImageScanRequest) (*bean3.ImageScanExecutionDetail, error) + func (impl *ImageScanServiceImpl) GetArtifactVulnerabilityStatus(ctx context.Context, request *bean2.VulnerabilityCheckRequest) (bool, error) + func (impl *ImageScanServiceImpl) VulnerabilityExposure(request *repository3.VulnerabilityRequest) (*repository3.VulnerabilityExposureListingResponse, error) + func (impl ImageScanServiceImpl) FetchAllDeployInfo(request *bean3.ImageScanRequest) ([]*repository3.ImageScanDeployInfo, error) + func (impl ImageScanServiceImpl) FetchExecutionDetailResult(request *bean3.ImageScanRequest) (*bean3.ImageScanExecutionDetail, error) + func (impl ImageScanServiceImpl) FetchScanExecutionListing(request *bean3.ImageScanRequest, deployInfoIds []int) (*bean3.ImageScanHistoryListingResponse, error) + func (impl ImageScanServiceImpl) IsImageScanExecutionCompleted(image, imageDigest string) (bool, error) + type PolicyService interface + DeletePolicy func(id int, userId int32) (*bean.IdVulnerabilityPolicyResult, error) + GetApplicablePolicy func(clusterId, envId, appId int, isAppstore bool) (map[string]*repository3.CvePolicy, ...) + GetBlockedCVEList func(cves []*repository3.CveStore, clusterId, envId, appId int, isAppstore bool) ([]*repository3.CveStore, error) + GetCvePolicy func(id int, userId int32) (*repository3.CvePolicy, error) + GetPolicies func(policyLevel securityBean.PolicyLevel, clusterId, environmentId, appId int) (*bean.GetVulnerabilityPolicyResult, error) + HasBlockedCVE func(cves []*repository3.CveStore, cvePolicy map[string]*repository3.CvePolicy, ...) bool + SavePolicy func(request bean.CreateVulnerabilityPolicyRequest, userId int32) (*bean.IdVulnerabilityPolicyResult, error) + UpdatePolicy func(updatePolicyParams bean.UpdatePolicyParams, userId int32) (*bean.IdVulnerabilityPolicyResult, error) + VerifyImage func(verifyImageRequest *VerifyImageRequest) (map[string][]*VerifyImageResponse, error) + type PolicyServiceImpl struct + PipelineRepository pipelineConfig.PipelineRepository + func NewPolicyServiceImpl(environmentService environment.EnvironmentService, logger *zap.SugaredLogger, ...) *PolicyServiceImpl + func (impl *PolicyServiceImpl) DeletePolicy(id int, userId int32) (*bean.IdVulnerabilityPolicyResult, error) + func (impl *PolicyServiceImpl) GetApplicablePolicy(clusterId, envId, appId int, isAppstore bool) (map[string]*repository3.CvePolicy, ...) + func (impl *PolicyServiceImpl) GetBlockedCVEList(cves []*repository3.CveStore, clusterId, envId, appId int, isAppstore bool) ([]*repository3.CveStore, error) + func (impl *PolicyServiceImpl) GetCvePolicy(id int, userId int32) (*repository3.CvePolicy, error) + func (impl *PolicyServiceImpl) GetPolicies(policyLevel securityBean.PolicyLevel, clusterId, environmentId, appId int) (*bean.GetVulnerabilityPolicyResult, error) + func (impl *PolicyServiceImpl) HasBlockedCVE(cves []*repository3.CveStore, cvePolicy map[string]*repository3.CvePolicy, ...) bool + func (impl *PolicyServiceImpl) SavePolicy(request bean.CreateVulnerabilityPolicyRequest, userId int32) (*bean.IdVulnerabilityPolicyResult, error) + func (impl *PolicyServiceImpl) SendEventToClairUtility(event *ScanEvent) error + func (impl *PolicyServiceImpl) UpdatePolicy(updatePolicyParams bean.UpdatePolicyParams, userId int32) (*bean.IdVulnerabilityPolicyResult, error) + func (impl *PolicyServiceImpl) VerifyImage(verifyImageRequest *VerifyImageRequest) (map[string][]*VerifyImageResponse, error) + type ScanEvent struct + AccessKey string + AppId int + AwsRegion string + CiArtifactId int + DockerRegistryId string + EnvId int + Image string + ImageDigest string + PipelineId int + SecretKey string + Token string + UserId int + type ScanToolMetadataService interface + MarkOtherToolsInActive func(toolName string, tx *pg.Tx, version string) error + MarkToolAsActive func(toolName, version string, tx *pg.Tx) error + type ScanToolMetadataServiceImpl struct + func NewScanToolMetadataServiceImpl(logger *zap.SugaredLogger, ...) *ScanToolMetadataServiceImpl + func (impl *ScanToolMetadataServiceImpl) MarkOtherToolsInActive(toolName string, tx *pg.Tx, version string) error + func (impl *ScanToolMetadataServiceImpl) MarkToolAsActive(toolName, version string, tx *pg.Tx) error + type VerifyImageRequest struct + ClusterName string + Images []string + Namespace string + PodName string + ReleaseName string + type VerifyImageResponse struct + FixedVersion string + Name string + Package string + Severity string + Version string