Skip to content

Refactor vulns and vuln events tables#1804

Draft
Hubtrick-Git wants to merge 12 commits intomainfrom
refactor-vuln-events-table
Draft

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

Conversation

@Hubtrick-Git
Copy link
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

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
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
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