Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v6 vulnerability & blob stores #2243

Merged
merged 4 commits into from
Nov 13, 2024
Merged

Conversation

wagoodman
Copy link
Contributor

Adds the VulnerabilityHandle, Blob, and BlobDigest models as well as the first blob, VulnerabilityBlob with supporting structs and store accessors (only in the Db v6 schema).

When adding a new vulnerability to the DB the store objects handle serializing the object to JSON and storing to the DB within the blobs table (and the same is true for fetching in reverse). When the store is open for writing the blob_digests table is created and populated with each write to the blobs table; since this takes up a good amount of space in the DB and isn't needed for distribution, upon closing the store this table is dropped entirely.

Partially addresses #2128 #2132

@wagoodman wagoodman requested a review from a team November 6, 2024 18:22
@wagoodman wagoodman marked this pull request as ready for review November 6, 2024 18:57
@wagoodman wagoodman self-assigned this Nov 6, 2024
@wagoodman wagoodman added the changelog-ignore Don't include this issue in the release changelog label Nov 6, 2024
Base automatically changed from add-v6-provider-store to main November 6, 2024 21:17
@wagoodman wagoodman force-pushed the add-v6-vulnerability-store branch from ed82238 to 0c9c815 Compare November 6, 2024 21:20
@wagoodman wagoodman force-pushed the add-v6-vulnerability-store branch from 0c9c815 to e1f4bc0 Compare November 6, 2024 21:30
grype/db/v6/blob_store.go Show resolved Hide resolved
grype/db/v6/blob_store.go Show resolved Hide resolved
grype/db/v6/vulnerability_store.go Show resolved Hide resolved
grype/db/v6/blobs.go Outdated Show resolved Hide resolved
@wagoodman wagoodman enabled auto-merge (squash) November 13, 2024 21:30
@wagoodman wagoodman merged commit cac76d5 into main Nov 13, 2024
10 checks passed
@wagoodman wagoodman deleted the add-v6-vulnerability-store branch November 13, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-ignore Don't include this issue in the release changelog
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants