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

Replace grype db diff with grype db search --since DATE #2129

Open
wagoodman opened this issue Sep 17, 2024 · 6 comments
Open

Replace grype db diff with grype db search --since DATE #2129

wagoodman opened this issue Sep 17, 2024 · 6 comments
Milestone

Comments

@wagoodman
Copy link
Contributor

As currently written the DB diff command will be cumbersome to keep as a feature while working on v6. We could leave DB diff in tact for v1-5 schemas, but this would be confusing for users attempting to use this diff feature for the latest (v6) DBs.

V6 currently is going to have a blobs table where digests for content could be recomputed and used as a foundation for a diff, however that is out of scope for v6 unless there is a convincing argument / need to keep this feature and add to the v6 scope further.

@wagoodman wagoodman added this to the DB v6 milestone Sep 17, 2024
@TimBrown1611
Copy link

hi! @wagoodman diff is important since we want to track changes of the DB.
how can it be done on v6 schema? will v6 contain update date for each record?
thanks!

@wagoodman
Copy link
Contributor Author

As eluded to in #2128 (comment) there is a way to compute the records that differ.

Is this an important use case to you? If so, can you tell us more about why so?

We dropped figuring this out in v6 to cut scope, but if we have enough users that really depend on this then that would be good reason to keep it in scope (in which case I'd close this issue and make a new one on how to implement the diff command).

@TimBrown1611
Copy link

I use this command to handle states of last-modified CVEs.
I have to do it separately since the DB is stateless, and some sources don't provide modified date or create date.

@wagoodman wagoodman added this to OSS Sep 26, 2024
@wagoodman wagoodman moved this to Ready in OSS Sep 26, 2024
@willmurphyscode
Copy link
Contributor

@TimBrown1611 when you say some sources don't provide modified or created date, do you mean in the upstream data? Like, are there specific data sources that grype db consumes that are missing this data? If so, which ones?

If grype had a date added and date updated date for most issues in each database, would you still need grype db diff?

@willmurphyscode
Copy link
Contributor

From discussion on our livestream on 10 October 2024, we had the idea:

Can we add grype db search --since DATE to print information about CVEs that were added or changed since DATE. Schema v6 would support that, and it seems like this is a simpler, more flexible way of comparing two databases. @TimBrown1611 would that meet your needs?

Things to consider:

  1. What if data is deleted between db versions?
  2. How to handle differences between what dates are available from different providers?

@willmurphyscode willmurphyscode changed the title Remove grype DB diff command Replace grype db diff with grype db search --since DATE Oct 10, 2024
@TimBrown1611
Copy link

Hi,

  1. If a CVE was deleted its ok since it will not appear in the results.
  2. Namespace field will be removed in v6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready
Development

No branches or pull requests

3 participants