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 a "has_vulnerability" property on Package and Component to support Queries and Column Templates and Product Review #2

Closed
DennisClark opened this issue Dec 7, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request HighPriority High Priority Top Priority (Max 3 per Release) Focus for a release vulnerabilities Vulnerability Management
Milestone

Comments

@DennisClark
Copy link
Member

DennisClark commented Dec 7, 2023

To get more value out of our VulnerableCodeDB integration, it would be great if we could add a "has_vulnerability" property to both the Package model and the Component model to support queries and column templates.

This is complicated by the fact that the DejaCode Report system is made to work on the DejaCode Database values, I'm not sure how we'll be able to accomplish since the Vulnerability data is stored in an external DB.

One idea would be to fetch both list of all vulnerable PURLs and CPEs references in the VulnerableCodeDB and store this the DejaCode cache. These lists could be updated in the cache on a daily basis. This would required new specialized API endpoints on the VulnerableCode side. (Also, as a first step before implementing any of this, we should get some stats about the amount of data stored in the VulnerableCodeDB and how it will evolve.)

We have a working prototype for this but we do not have the infrastructure in place for periodic async tasks (the celerybeat worker service need to be setup, or alternatively we could complete the migration to RQ that has direct support for periodic tasks. ( @tdruez please update this remark if the RQ migration complete is now complete ).

Also we might consider a few additional things (maybe they belong in different issues, but perhaps best discussed in this context first):

  • Think about automatically setting a (new) Product Inventory Status of “Vulnerability review required” when a vulnerable package is assigned to a product. Perhaps we do that in addition to a background process that looks at updated vulnerabilities (VulnerableCodeDB history dates are coming soon) and sets/resets those status values appropriately. An advantage of such an approach is that we can already filter by Product Inventory status (product relation status).
  • Alternatively (or also) provide a command on Product Inventory that filters to show just the items (packages mostly) with vulnerabilities.
  • And, if we end up doing the primary point of this issue, perhaps we can have a filter on the user view packages list that filters to show only packages with vulnerabilities.
@DennisClark DennisClark added the enhancement New feature or request label Dec 7, 2023
@DennisClark DennisClark added the vulnerabilities Vulnerability Management label Dec 7, 2023
@DennisClark DennisClark added this to the DejaCode 5.1 milestone Dec 7, 2023
@DennisClark DennisClark changed the title Add a "has_vulnerability" property on Package and Component to support Queries and Column Templates Add a "has_vulnerability" property on Package and Component to support Queries and Column Templates and Product Review Dec 12, 2023
@DennisClark DennisClark added the HighPriority High Priority label Dec 12, 2023
tdruez added a commit that referenced this issue Dec 22, 2023
Signed-off-by: tdruez <tdruez@nexb.com>
@DennisClark DennisClark added the Top Priority (Max 3 per Release) Focus for a release label Jan 4, 2024
@tdruez
Copy link
Contributor

tdruez commented Aug 21, 2024

Implemented in #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HighPriority High Priority Top Priority (Max 3 per Release) Focus for a release vulnerabilities Vulnerability Management
Projects
None yet
Development

No branches or pull requests

2 participants