fix: correct the retention webhook payload
Fix the incorrect number of total and retained in the retention webhook
payload, and completes the deleted_artifacts field.
Fixes: #18428
Signed-off-by: chlins <chenyuzh@vmware.com>
fix copy artifact issue
To enable the middleware to save the project_blob data, make sure to set the accessories options to true when handling the artifact copy.
Signed-off-by: Wang Yan <wangyan@vmware.com>
fix: escape the event data for slack webhook payload
Escape the event data of slack webhook as original payload is invalid
when send to slack.
Fixes: #18423
Signed-off-by: chlins <chenyuzh@vmware.com>
fix: fix the invalid jobid for scan data export
Change the JobId param type from int to string, use int will bring some
problems for encode/decode type mismatch which generate the invalid
repository name.
Fixes: #18380
Signed-off-by: chlins <chenyuzh@vmware.com>
Update DB Dockerfile.base
1. Update the path to postgresql.conf.sample as it has changed in postgresql 13.10
2. Remove creating symbolic link as it already exists in postgresql 13.10
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
fix: resolve the oidc or ldap group user cannot export cve
Remove the project filter in the scan data export job as they have been
validated by API handler, fix the oidc or ldap group users cannot export
cve.
Fixes: #18112
Signed-off-by: chlins <chenyuzh@vmware.com>
fix: update the replication API handler
1. Check execution before stop replication execution.
2. Check execution before list replication tasks.
Signed-off-by: chlins <chenyuzh@vmware.com>
1. Change the Export CVE temporary file directory to /tmp.
2. Remove the scan data export volume in Dockerfile and docker-compose
yaml.
Fixes: #18067
Signed-off-by: chlins <chenyuzh@vmware.com>
fix: upgrade trivy version to v0.35.0 and trivy-adapter version to v0.30.3
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
Fix setup gcloud error
ubuntu-latest was upgraded from ubuntu-20.04 to ubuntu-22.04, the python version of ubuntu-22.04 is 3.10, but gcloud does not support python 3.10, so ubuntu is fixed to version 20.04
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
feat: support customize registry http client timeout
Support override the registry http client timeout from env `REGISTRY_HTTP_CLIENT_TIMEOUT` (in minutes), the timeout is 30 minutes by default.
Signed-off-by: chlins <chenyuzh@vmware.com>
fix: add human friendly message when export cve job failure
Add human friendly when export CVE in the condition of empty CSV file,
because this file will be stored as system artifact and pushed to
distribution, but it will leads to error when push empty blob to S3
storage driver.
Signed-off-by: chlins <chenyuzh@vmware.com>
feat: introduce the copy by chunk for replication
1. Add sql migration to alter replication policy table
2. Implement the PullBlobChunk and PushBlobChunk for the underlying v2 registry client
3. Update image transfer logic to support copy by chunk
4. Update the replication policy API handler
Signed-off-by: chlins <chenyuzh@vmware.com>
Add scan data export API test case
1. Add export scan data API test case
2. Add get scan data export execution list test case
3. Add get scan data export execution test case
4. Add download scan data test case
Signed-off-by: Yang Jiao <jiaoya@vmware.com>