Skip to content

claircore: aliases#1783

Open
hdonnay wants to merge 2 commits intoquay:mainfrom
hdonnay:feature/not-affected/aliases
Open

claircore: aliases#1783
hdonnay wants to merge 2 commits intoquay:mainfrom
hdonnay:feature/not-affected/aliases

Conversation

@hdonnay
Copy link
Member

@hdonnay hdonnay commented Mar 19, 2026

This creates the Alias type, adds it to the Vulnerability type, and adds relevant database tables.

It does not add any code that makes use of these types.

@hdonnay hdonnay added this to the Not Affected milestone Mar 19, 2026
@hdonnay hdonnay requested a review from a team as a code owner March 19, 2026 21:44
@hdonnay hdonnay force-pushed the feature/not-affected/aliases branch 2 times, most recently from f52976b to 5d4fada Compare March 20, 2026 13:58
hdonnay added 2 commits March 24, 2026 14:04
See-also: https://issues.redhat.com/browse/CLAIRDEV-85
Change-Id: Ie542a328758fb2eacfc15cf15108249421e11286
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
This provides a standardized way to identify aliases and
cross-references between vulnerabilities.

See-also: https://issues.redhat.com/browse/CLAIRDEV-85
Change-Id: I7255300dddb328dcb5b579523c8efcffe1a560f0
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
@hdonnay hdonnay force-pushed the feature/not-affected/aliases branch from 5d4fada to 82da00e Compare March 24, 2026 19:04
Comment on lines +41 to +51

// Self is an Alias that is the "identity" for this Vulnerability.
//
// This should be a system-wide, external identifier.
Self Alias
// Aliases is a set of aliases for the same abstract software flaw.
//
// For example, GHSA advisories frequently also reference CVE identifiers.
//
// This may contain the "Self" alias.
Aliases []Alias

Choose a reason for hiding this comment

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

Were the json tags left out intentionally?

Copy link

@dcaravel dcaravel Mar 24, 2026

Choose a reason for hiding this comment

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

nit: consider adding test for Valid()


CREATE TABLE IF NOT EXISTS alias (
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
namespace INTEGER REFERENCES alias_namespace (id) ON DELETE CASCADE,
Copy link

@dcaravel dcaravel Mar 24, 2026

Choose a reason for hiding this comment

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

Should namespace have NOT NULL ?

Comment on lines +46 to +51
// Aliases is a set of aliases for the same abstract software flaw.
//
// For example, GHSA advisories frequently also reference CVE identifiers.
//
// This may contain the "Self" alias.
Aliases []Alias

Choose a reason for hiding this comment

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

Would this be easier to digest if it was prescriptive? - ie: "will always contain self alias" or "will never contain self alias"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants