-
-
Notifications
You must be signed in to change notification settings - Fork 234
Collect Mattermost #397
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
Collect Mattermost #397
Conversation
@Hritik14 you mean there are vulnerabilities with |
@sbs2001 As vulnerability_id is by definition designed only for cve and automated vulcon ids, adding Further, even if we stretch the is_cve check, mattermost has had advisory ids as |
@sbs2001 any update? |
3e914a1
to
ec4ee48
Compare
Rebased. |
Some comments, as you are raising interesting issues:
|
|
rather than hashing (which is in someway a shortcut and an optimization) what would be a way to search for a possible pre-existing vulnerability to avoid creating a dupe? What would be the (existing) attributes and data that could be used to uniquely identify a vulnerability in this case? |
What's wrong with an optimization? Using the advisory hash as vulcoid would ensure consistency across multiple installations and avoid duplicates in same installation as well.
We could use the impacted packages, the package it was fixed in and the description to uniquely identify a vulnerability. Most of it is present in the Advisory. Also, I think this deserves it's own place in the issue tracker. |
An optimization may hide the real thing when applied too early. Here what I am trying to get from you is what are the attributes that you would use to determine equality and identity. See also https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize The other problem with using a content-based identifier (such as a hash of some fields content as a vulcoid) is that the id MAY change as the content change and this at the possible worst time: say you use a
Therefore you do not need much of a hash for now, you can instead just use these set if items for identity: |
Yes, you're right. We should come to the optimization after developing a proper structure.
Considering this, if a change happens in the advisory, say in fixed packages, then when we re-encounter the same advisory we'd have 2 choices
In the second case, we would need to define what a considerable high match is. That could be done at the importer side as it could be either description which is expected to change or the impacted packages. If both change and we don't have a non-vulcoid vul id, we must create a new one (case 1). |
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.
You weren't kidding when you said code is not very elegant
ec4ee48
to
13d4421
Compare
A crude approach |
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
The code is not very elegant but so is the mattermost advisory page. They have been trying to make advisories more formatted and standard but at the time being, the current script should hold, hopefully in future too. Remaining tasks - [] Troubleshoot duplicate entries - As there is no vulnerability id on the page, everytime the importer is run it duplicates all the vulnerabilities. - [] Write tests Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
13d4421
to
590bb91
Compare
@Hritik14 don't worry about duplicate vulcoids for now. |
@Hritik14 do you mind to rebase? |
@Hritik14 do you mind to rebase or pull to resolve the conflict? |
we would also need a test to merge this. |
e9c7ac2
to
dde48ae
Compare
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
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.
Let's merge this first and fix it later.
Please enter an issue to track that
We are merging first and will fix issues afterward.
The PR
will beis up for reviewby Mar 24.Fixes #224
EDIT:
The code is not very elegant but so is the mattermost advisory page.
They have been trying to make advisories more formatted and standard but
at the time being, the current script should hold, hopefully in the future
too.
Remaining tasks
[ ] Troubleshoot duplicate entries- As there is no vulnerability id on the page,
everytime the importer is run it duplicates all
the vulnerabilities.
Signed-off-by: Hritik Vijay hritikxx8@gmail.com