-
Notifications
You must be signed in to change notification settings - Fork 532
Add openssh file test #274
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
Comments
i'll work on this! |
Still looking for a good test here. Feel free to work on this even if someone else is already working on it -- there is no harm in havnig more than one file test for openssh and unless people happen to choose absolutely identical files, we can merge multiple solutions here. |
I started working on this. I have a question regarding the version detection. I ran the tests with some files and noticed that some files of version Is this the desired functionality? Should I write the tests to expect whatever is the first version occurrence in the binaries? Here you can see
Also, sometimes the version detected will contain a space at the end. E.g. If these are unintended, I could take a shot at fixing them. |
The first is unintended but sort of expected. It's a side effect of the way that python treats versions as bigger-than, and you can see how we worked around it in the openssl-specific code in cvedb.py. A fix would be good. For systemd (one of the others that has multiple version strings in a regular file) we actually just did a sort on the lines before doing matching, but maybe it's time to build a more generic solution. However, once we get a fix, we're going to have another problem: we aren't actually comparing on revisions in getcves right now, and they're stored separately in NVD sometimes. So you may have to do some digging through cve.db and the json database to figure out how best to actually make use of the data once you've got it. The space at the end is utterly unintended, though. We probably need a .strip() in get_version or something. That at least should be an easy fix, so you probably want to do that one separately. |
Thank you, I'll take a look at how it's done currently. |
openssh has a cve mapping test, but not a file test.
Instructions here: Adding signature tests against real files
This is a beginner-suitable task. Since this is our first real-file test, it's possible you will discover an issue with the checker itself during testing. If you do, please mention it here!
The text was updated successfully, but these errors were encountered: