Skip to content

Delete reopened and fixed system events#1943

Merged
timbastin merged 4 commits into
mainfrom
delete-reopened-and-fixed-system-events
May 11, 2026
Merged

Delete reopened and fixed system events#1943
timbastin merged 4 commits into
mainfrom
delete-reopened-and-fixed-system-events

Conversation

@refoo0
Copy link
Copy Markdown
Member

@refoo0 refoo0 commented May 7, 2026

No description provided.

refoo0 added 2 commits May 7, 2026 17:41
…dependency vuln states

Signed-off-by: rafi <refaei.shikho@hotmail.com>
…y vuln state update

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copilot AI review requested due to automatic review settings May 7, 2026 16:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to remove system-generated fixed/reopened vulnerability events and align stored vulnerability state with the most recent event state, while also exposing OriginalAssetVersionName in the ConvertVulnEventToDto transformer.

Changes:

  • Include OriginalAssetVersionName when converting models.VulnEventdtos.VulnEventDTO.
  • Skip creating fixed/reopened events when userID == "system" for dependency vulnerabilities.
  • Add a SQL migration to delete system fixed/reopened events and update dependency_vulns.state based on the latest event.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
transformer/vulnevent_transformer.go Adds OriginalAssetVersionName to the DTO conversion for plain VulnEvent.
services/dependency_vuln_service.go Prevents fixed/reopened event creation when the acting user is system.
database/migrations/20260507143643_delete_fixed_and_reopend_system_events_and_apply_last_event_state.up.sql Deletes system fixed/reopened events and attempts to resync dependency_vulns.state from latest events.
database/migrations/20260507143643_delete_fixed_and_reopend_system_events_and_apply_last_event_state.down.sql Empty down migration file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/dependency_vuln_service.go
Comment thread services/dependency_vuln_service.go
refoo0 and others added 2 commits May 7, 2026 19:30
Signed-off-by: rafi <refaei.shikho@hotmail.com>
…ystem_events_and_apply_last_event_state.down.sql

Signed-off-by: Tim Bastin <38261809+timbastin@users.noreply.github.com>
@timbastin timbastin merged commit 1389336 into main May 11, 2026
11 of 12 checks passed
@timbastin timbastin deleted the delete-reopened-and-fixed-system-events branch May 11, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants