-
-
Notifications
You must be signed in to change notification settings - Fork 264
Handle vulnerabilities which don't have any vulnerability ids #259
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
Conversation
|
For the models the requirements as we decided upon at #232 are (this is a partial repaste of @pombredanne 's comment)
From a usage standpoint, this means that we should be able to search a vulnerability not only based on its identifier (that may change over time) but also based on its references. Alternatively to c. above we could have a dedicated field to store the previous The model could look like this
|
|
The current models gives me this |
43bb7a7 to
3538474
Compare
|
I'm using https://github.com/sbs2001/vulcodes as the repo for dev purpose. |
705b859 to
020788c
Compare
|
I am wondering ..."VULCODE-XXX" feels a little bit too generic, and I am kinda warming up to a the explicit albeit longer "VULNERABLECODE-XXX" prefix even if a tad long... it is explicit and meant to be replaced eventually by a CVE (and it is also very clear where it is coming from)? |
pombredanne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Looking good except for the "vulcode/VULCODE" name that I would like to discuss more.
I wonder if we should not instead just treat the "past" vc_identifier as just an external reference? |
|
I revisited https://cve.mitre.org/data/refs/index.html and I suggest this instead prefix |
|
@pombredanne |
incremental id works too but requires more coordination than a context free timestamp. I am not sure a sequential number is easier to remember than a time stamp though it can be shorter. |
How so ? The timestamp is dependent on when the instance encountered the vulnerability. coordination is needed in that case too if we want 2 instances to "have a common language" . IMHO coordination is unavoidable. |
|
IMHO |
|
@pombredanne It made sense to me about using timestamps instead of incremental ids after the chat. Main reason being, when using |
5e1547a to
be26c53
Compare
be26c53 to
38eee2b
Compare
38eee2b to
3d710ea
Compare
|
@pombredanne I am stashing the code to extract vulcoids to some other branch. This PR won't add that, that feature seems pre-mature to me. |
b51b430 to
b8fa296
Compare
pombredanne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! See my comments inline. IMHO the main issue we have is the name "identifier"
Either we use that everywhere, of may be we use vulnerability_id instead which would be more explicit and work in all the contexts.
4b1fc9f to
48750ca
Compare
|
|
||
| all_package_versions = self.versions.get(package_name) | ||
| if len(all_package_versions) == 0: | ||
| if not len(all_package_versions): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if not len(all_package_versions): | |
| if not all_package_versions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing the safetydb changes in other pr
| # meaning if cve_ids is not [''] but either ['CVE-123'] or ['CVE-123, CVE-124'] | ||
| if len(cve_ids[0]): | ||
| cve_ids = [s.strip() for s in cve_ids.split(",")] | ||
| if advisory["cve"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be create a variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing the safetydb changes in other pr
pombredanne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good ... I have a few minor nit pickings but this is good to merge!
Thanks!
This reduces the dependence on CVE ID. Cases where vulnerability don't have CVE can be handled Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
This command takes as input a remote repo's url. Upon invoking the command all the vulnerabilities which were id'd by vulnerablecode will be pushed to this repo. Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Added incremental time id in import_runner.py to prevent vulnerability id conflicts Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* In model Vulnerability "identifier" -> "vulnerability_id" * In Advisory dataclass "identifier" -> "vulnerability_id" Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
c43a81c to
e48fa44
Compare
Fixes #232
Vulnerabilitymodel and it's methods right. Use a timestamp as a custom id for now.Vulnerabilitymodel.VulnerableCodeto either assign these ids or sync the ids from the repo.Signed-off-by: Shivam Sandbhor shivam.sandbhor@gmail.com