Conversation
pombredanne
left a comment
There was a problem hiding this comment.
Thanks!
See my comments in line for your consideration.
pombredanne
left a comment
There was a problem hiding this comment.
See my suggested changes for the models.
|
@sbs2001 you wrote:
It can but then how scoring systems will we have? At most a couple per data sources, and in reality only a handful. And this is purely static data, and not really usable as data for some query except for the identifier so I am not sure this needs the added ceremony and complexity when stored in the DB. (e.g. you then need fixtures to bootstrap etc.). I see this instead as an enhanced but still very small list of value choices for a single field. |
efcf6df to
f6371c6
Compare
0118d9e to
b24c934
Compare
d6b2bee to
9a72e52
Compare
pombredanne
left a comment
There was a problem hiding this comment.
Thanks!
See my comments inline
9a72e52 to
b0aeef5
Compare
* Correct typo in severity_systems.py * Use typo for scoring fields instead of list in models.py Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Correct typo in severity_systems.py * Use typo for scoring fields instead of list in models.py * Handle absence of bugzilla and RHSA better in redhat.py Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2656e76 to
783292b
Compare
pombredanne
left a comment
There was a problem hiding this comment.
Almost there ! see my comments inline for your consideration.
A VulnerabilitySeverity models is added in models.py to store severity of vulnerability. Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
A dataclass `VulnerabilitySeverity` is added to enable to transport of severity scores. The logic in importer_runner.py is modified to store, update severity scores and link it to reference and vulnerability 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>
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>
scoring_system_identifier is changed to scoring_system Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
* Correct typo in severity_systems.py * Use typo for scoring fields instead of list in models.py * Handle absence of bugzilla and RHSA better in redhat.py Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
c737b5a to
8d19463
Compare
| bugzilla = advisory_data.get("bugzilla") | ||
| if bugzilla: | ||
| url = "https://bugzilla.redhat.com/show_bug.cgi?id={}".format(bugzilla) | ||
| bugzilla_data = requests.get(f"https://bugzilla.redhat.com/rest/bug/{bugzilla}").json() |
There was a problem hiding this comment.
Just as a side note, this is the kind of JSON we would likely need to store forever as back auditable evidence when we will do this later ... which likely calls for a central place where we fetch things from
| max_length=50, | ||
| choices=scoring_system_choices, | ||
| help_text="Identifier for the scoring system used. Available choices are: {} ".format( | ||
| ", ".join( |
There was a problem hiding this comment.
For readability, an intermediate variable would be better for this
| namespace="redhat", | ||
| name="bash", | ||
| version="4.1.2-48.el6", | ||
| qualifiers=OrderedDict(), |
There was a problem hiding this comment.
Feel free to remove OrderedDict from the whole codebase BTW since the dicts are always ordered now.
* Correct typo in severity_systems.py * Use typo for scoring fields instead of list in models.py * Handle absence of bugzilla and RHSA better in redhat.py Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Implementation of #157 (comment)
Fixes #157