-
Notifications
You must be signed in to change notification settings - Fork 202
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
RFC: Design new Advisory -> Package -> Vulnerability models relationhips #1393
Comments
Some random notes:
|
This is a major refactoring of the models with major implications on the UI and the API since Advisories would become of first-class objects. We could possibly create some facade and adapters such that in the short term we can do model changes and do not need to refactor the whole UI and API. This would be more work but would avoid breaking things upfront. Here is a first possible approach with ghost relationships
Another approach is to create new modelsWe would create and will use in parallel a full set of new duplicated models like Package2, Vulnerability2 and so on have a v2 of the UI and API. At some point in the future we would deprecate and retire the old models, UI and API. This is more work and some duplicated code, BUT means less instability. |
After discussion this is preferred:
We will therefore have progressively a new v2 API and v2 UI in small chunks and will avoid wrecking everything. |
See also: We could add a field at the advisory level to track its license, but we are tracking the license consistently for each importer already. Just food for thoughts. |
Context
In our current approach, we aggregate data from multiple advisories in a single vulnerability which is unique based on its aliases.
Problem
An Advisory may be strictly about a given Package ecosystem, and provide a score just for an ecosystem. Therefore, if we merge and combine everything in a single Vulnerability, we can end up with misleading data or messy data. In some other cases, we historically mixed importing and improving, leading to performance and confusion issues.
For instance we have these issues:
Solution
The relationship should not be between a Package and a Vulnerability but rather a Package and an Advisory, and an Advisory to a Vulnerability.
Similarly, scores, categories and references may be specific to an Advisory and not about all the packages subject to a Vulnerability.
In this design we would essentially adopt a structure similar to that of VulnTotal
where multiple advisories are either concurring to the same impact conclusion or may disagree (which becomes a problem that needs curation either with a manual review or improvers)
Severity may also need some rethinking as they are from an Advisory and specific to some packages in many cases. For instance the severity/scores published by RedHat are only about the RPM packaging of a vulnerable package, not about any package or upstream in general.
See also:
@Hritik14 @TG1999 @keshav-space @DennisClark
The text was updated successfully, but these errors were encountered: