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

Include affected platforms in stored vulnerability data #149

Closed
haikoschol opened this issue Feb 12, 2020 · 5 comments · Fixed by #201
Closed

Include affected platforms in stored vulnerability data #149

haikoschol opened this issue Feb 12, 2020 · 5 comments · Fixed by #201

Comments

@haikoschol
Copy link
Collaborator

Some security issues only affect certain platform (as in operating systems, Linux distributions, etc.) The data model should include this information and allow querying for it to avoid false positives. The natural way to include this on the query side is with a platform qualifier on the package URL.

Here is an example of a vulnerability in a Rust crate that only affects Windows: https://github.com/RustSec/advisory-db/blob/master/crates/hyper/RUSTSEC-2016-0002.toml

@sbs2001
Copy link
Collaborator

sbs2001 commented May 19, 2020

This will be fixed, once we use JSONField for storing a purl's qualifiers right?

@haikoschol
Copy link
Collaborator Author

@sbs2001 I had completely forgotten about that plan. In some of the importers I merged as part of #123 I already included qualifiers. I'm not sure what implications that has for querying. I think we should still switch to a JSONField.

@sbs2001
Copy link
Collaborator

sbs2001 commented May 26, 2020

Coincidently, I was trying to do exactly that today, had the debian importer running for awhile ,which didn't finish due to powercut :( . I will try that once again.

@sbs2001
Copy link
Collaborator

sbs2001 commented May 30, 2020

Not working, it is storing the qualifiers as a single json string ie "distro=stretch" instead we want it be like {'distro':'stretch'}

@sbs2001
Copy link
Collaborator

sbs2001 commented May 30, 2020

Can be fixed easily in https://github.com/package-url/packageurl-python/blob/00b7df61173be3c19eb65ce166271aed0e9ae00c/src/packageurl/contrib/django_models.py#L123 by setting encode=False or not mentioning encode at all in PackageURL.to_dict()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants