* add stop sbom scanning API
1. [UI] support to stop sbom scanning #20200
2. add type for stop scanning api, make it able to support both vulnerability and sbom.
3. refactor the db query to support multiple extra attributes.
Signed-off-by: wang yan <wangyan@vmware.com>
Signed-off-by: xuelichao <xuel@vmware.com>
Co-authored-by: xuelichao <xuel@vmware.com>
* Update replication.go
It also could be 'library/bitnami/fluentd:1.13.3-debian-10-r0' so we need to split resource to only 2 parts - possible namespace and image name which may include slashes for example -
namespace: library, image: bitnami/fluentd:1.13.3-debian-10-r0
Signed-off-by: Taras Katkov <tkatkov@gmail.com>
* Update replication_test.go
Adding namespace and resource extraction tests.
Signed-off-by: Taras Katkov <tkatkov@gmail.com>
* Reformat only
Signed-off-by: Taras Katkov <tkatkov@gmail.com>
---------
Signed-off-by: Taras Katkov <tkatkov@gmail.com>
add artifact_type for artifact model to support artifactType filter
Signed-off-by: yminer <yminer@vmware.com>
add 2.11 sql schema & update index artifactType omitted
Signed-off-by: yminer <yminer@vmware.com>
update UT
update migrate sql for artifact_type
Signed-off-by: yminer <yminer@vmware.com>
remove debug line
* add generate sbom object utility
Leverage the go-containerregistry to generate the oci object for sbom and add it as an accessory of the subject artifact.
Signed-off-by: wang yan <wangyan@vmware.com>
* remove vendor
Signed-off-by: wang yan <wangyan@vmware.com>
* resolve comments
Signed-off-by: wang yan <wangyan@vmware.com>
* fix ut
Signed-off-by: wang yan <wangyan@vmware.com>
* resolve comments
Signed-off-by: wang yan <wangyan@vmware.com>
* remove the todo comments
Signed-off-by: wang yan <wangyan@vmware.com>
---------
Signed-off-by: wang yan <wangyan@vmware.com>
* Log ensureArtifact ConflictErr
Signed-off-by: Shuaiyi Liu <liushuaiyi@gmail.com>
* Log ensureArtifact ConflictErr
Signed-off-by: Shuaiyi Liu <liushuaiyi@gmail.com>
---------
Signed-off-by: Shuaiyi Liu <liushuaiyi@gmail.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
Enhance the API for triggering retention by optimizing it from synchronous to asynchronous to solve the problem of slow response in the case of a large number of tasks.
Signed-off-by: chlins <chenyuzh@vmware.com>
The permission api targets to return the full set of permissons for robot to use.
And only system and project admin have the access
Signed-off-by: wang yan <wangyan@vmware.com>
Add the new filed 'references' to the replication webhook payload, which
can help user better know the replicated artifact tags or digests.
(references is the lists of the artifact tag name or digest if no tag)
Signed-off-by: chlins <chenyuzh@vmware.com>
Support to configure the customized redis db for cache layer and other
misc business for core, by default the behavior is same with
previous(stored in db 0).
Signed-off-by: chlins <chenyuzh@vmware.com>
fix: add storage_limit check (add ValidateQuotaLimit as a general method to validate quota limit value)
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
fix: skip to delete scan reports if the digest still referenced by other artifacts
Avoid to delete the scan reports in case the artifact deleted but still
referenced by the other artifacts.
Signed-off-by: chlins <chenyuzh@vmware.com>
Introduce the quota update provider, improve the performance of pushing
artifacts to same project with high concurrency by implementing
optimistic lock in redis. By default the function is disabled, open it
by set env 'QUOTA_UPDATE_PROVIDER=Redis' for the core container.
Fixes: #18440
Signed-off-by: chlins <chenyuzh@vmware.com>
Fix the scanAll cannot be stopped in case of large number of artifacts,
add the checkpoint before submit scan tasks, mark the scanAll stopped
flag in the redis.
Fixes: #18044
Signed-off-by: chlins <chenyuzh@vmware.com>
Show more infors in the gc history, like the sweep size and how many blobs and manifests were removed by GC.
Signed-off-by: Wang Yan <wangyan@vmware.com>
Cleanup the associated resources(scan executions and scan reports) after
deletion of artifact.
Fixes: #18634
Signed-off-by: chlins <chenyuzh@vmware.com>