Skip to content

Commit

Permalink
python: Delete pyupio vulns
Browse files Browse the repository at this point in the history
Because no more update_operations are being created for pyupio the
current vulns will not be GCed. This is a manual intervention to
clear them up and avoid double reporting.

Signed-off-by: crozzy <[email protected]>
  • Loading branch information
crozzy committed Jun 1, 2023
1 parent 07c4530 commit 8bc2dc3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions datastore/postgres/migrations/matcher/09-delete-pyupio.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Delete all update_operations for pyupio to trigger pyupio vuln deletion
DELETE FROM update_operation WHERE updater = 'pyupio';

DELETE FROM vuln v1 USING
vuln v2
LEFT JOIN uo_vuln uvl
ON v2.id = uvl.vuln
WHERE uvl.vuln IS NULL
AND v2.updater = 'pyupio'
AND v1.id = v2.id;
4 changes: 4 additions & 0 deletions datastore/postgres/migrations/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,8 @@ var MatcherMigrations = []migrate.Migration{
ID: 8,
Up: runFile("matcher/08-updater-status.sql"),
},
{
ID: 9,
Up: runFile("matcher/09-delete-pyupio.sql"),
},
}

0 comments on commit 8bc2dc3

Please sign in to comment.