Skip to content

fix(db): handle missing vulnerability bucket in GetVulnerability#653

Open
prarit wants to merge 1 commit intoaquasecurity:mainfrom
prarit:fix-db-handle
Open

fix(db): handle missing vulnerability bucket in GetVulnerability#653
prarit wants to merge 1 commit intoaquasecurity:mainfrom
prarit:fix-db-handle

Conversation

@prarit
Copy link
Copy Markdown

@prarit prarit commented Mar 23, 2026

GetVulnerability panics with a nil pointer dereference when the vulnerability bucket does not exist in the database. This occurs when building with --only-update for a subset of sources, since the vulnerability bucket is populated by sources like NVD that may have been skipped.

Return an empty Vulnerability instead of panicking when the bucket is missing, consistent with how other read operations should handle partial databases.

Signed-off-by: Prarit Bhargava prarit@redhat.com

GetVulnerability panics with a nil pointer dereference when the
vulnerability bucket does not exist in the database. This occurs
when building with --only-update for a subset of sources, since
the vulnerability bucket is populated by sources like NVD that
may have been skipped.

Return an empty Vulnerability instead of panicking when the bucket
is missing, consistent with how other read operations should handle
partial databases.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
@prarit prarit requested a review from knqyf263 as a code owner March 23, 2026 17:17
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.

1 participant