refactor: use redhat dataSource for redhat-oval#626
refactor: use redhat dataSource for redhat-oval#626DmitriyLewen wants to merge 3 commits intoaquasecurity:mainfrom
Conversation
…/use-redhat-datasource-for-oval
|
I'd suggest a slightly different approach: keep the
On the other hand, Here's the suggested diff:
source = types.DataSource{
- ID: vulnerability.RedHatOVAL,
- Name: "Red Hat OVAL v2",
- URL: "https://www.redhat.com/security/data/oval/v2/",
+ // Use the same ID as the Security Data API ("redhat") so that users see
+ // a single, unified "redhat" severity source instead of the internal
+ // "redhat-oval" distinction, which is meaningless to them.
+ ID: vulnerability.RedHat,
+ Name: "Red Hat",
+ URL: "https://access.redhat.com/security/cve/",
}
const (
NVD types.SourceID = "nvd"
RedHat types.SourceID = "redhat"
- RedHatOVAL types.SourceID = "redhat-oval"
+ RedHatOVAL types.SourceID = "redhat-oval" // Used only for tracker Name() identification
RedHatCSAFVEX types.SourceID = "redhat-csaf-vex" var AllSourceIDs = []types.SourceID{
NVD,
RedHat,
- RedHatOVAL,
Debian,
|
…tification Keep RedHatOVAL as the Name() return value while DataSource.ID stays "redhat" so users see a single unified severity source.
|
Yes, that makes sense. BTW, in your diff there are no changes for the Also I built the database and checked - everything works correctly.
|
Description
This PR consolidates the Red Hat OVAL data source to use the existing RedHat data source identifier instead of maintaining a separate RedHatOVAL identifier.
See more details in aquasecurity/trivy#9192 (comment)
Changes
Related PRs