mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-23 07:11:36 +01:00
fix: Clean old version scan reports of trivy (#16235)
From harbor 2.4, the trivy does not support scan report v1.0, we need to remove the old version scan reports from the DB. Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
parent
7ff0bf188a
commit
097efb201b
@ -20,3 +20,5 @@ CREATE TABLE IF NOT EXISTS artifact_accessory (
|
||||
FOREIGN KEY (subject_artifact_id) REFERENCES artifact(id),
|
||||
CONSTRAINT unique_artifact_accessory UNIQUE (artifact_id, subject_artifact_id)
|
||||
);
|
||||
|
||||
DELETE FROM scan_report WHERE mime_type='application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' AND registration_uuid IN (SELECT uuid FROM scanner_registration WHERE name='Trivy' AND immutable='true');
|
||||
|
Loading…
Reference in New Issue
Block a user