Skip to content

Refactor vulns and vuln events tables#1804

Open
Hubtrick-Git wants to merge 26 commits intomainfrom
refactor-vuln-events-table
Open

Refactor vulns and vuln events tables#1804
Hubtrick-Git wants to merge 26 commits intomainfrom
refactor-vuln-events-table

Conversation

@Hubtrick-Git
Copy link
Copy Markdown
Collaborator

@Hubtrick-Git Hubtrick-Git commented Mar 23, 2026

Vulnerability table changes

  • Migrate the id columns of the 3 vuln tables dependency_vulns, first_party_vulnerabilities and license_risk.
  • Previously the id was a 256 bit hash stored as a text -> Now its only a 128 bit hash stored as a uuid
  • This leads to 1/4 of the disk space required and performance improvements regarding internal processing of UUIDs in comparison to text

VulnEvent table changes

  • Drop updated_at column to reduce space
  • Use 3 foreign key columns, 1 for each vuln instead of the current single column

Now we need to refactor the existing code regarding the affected columns

Frontend

Database

  • rebuild indexes

Queries

  • Change all queries using vuln_events
  • Change all queries using vuln_ids

Go Code

  • Change vuln event model and refactor affected code
  • Change the vulnerability model and refactor affected code

Copilot AI review requested due to automatic review settings March 23, 2026 13:30

This comment was marked as resolved.

@Hubtrick-Git
Copy link
Copy Markdown
Collaborator Author

Closed co pilot suggestions since this is still a work in porgress but was missing such classification.

@Hubtrick-Git Hubtrick-Git marked this pull request as draft March 26, 2026 16:25
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

Copilot reviewed 69 out of 71 changed files in this pull request and generated 8 comments.


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

@Hubtrick-Git Hubtrick-Git marked this pull request as ready for review April 2, 2026 14:31
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.

2 participants