-
Notifications
You must be signed in to change notification settings - Fork 575
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
False positive on certifi 2022.12.07 #1034
Comments
Thanks for the report @mrginglymus! Yes, this is because we don't currently have exact support for python version comparisons according to PEP 440 and it does cause some false positives. #986 is another case of this. |
reproduces for me as well
|
This CVE is recorded wrong by Github IMO. The actual correct version is 2022.12.7 but the CVE is wrong in that it reports the vulnerable version is < 2022.12.07 and fixed version >= 2022.12.07 -- there is no .07 it is .7 This problem is happening with this CVE in other security tools too. |
@danekantner This sort of stuff is bound to happen again and again. Thank You |
I'm not with Grype. I was looking at this because I have other security tools that are doing the same thing. The package maintainers have responded back saying this is the way it's going to be, and all of the various security vendors need to write custom snowflake code to deal with python packages that use release dates as version schemes. The python wheel setup package changes the version scheme when it builds the packages and they think this is acceptable. |
This BTW was apparently decided on as some precedent when the python issue for this was closed: pypa/setuptools#302 |
I can also confirm the same issue with a newer version of the certifi package:
|
What happened:
What you expected to happen:
No security advisory
How to reproduce it (as minimally and precisely as possible):
Python docker image with certifi==2022.12.7 installed
Anything else we need to know?:
certifi
publish their python packages with a 'human formatted' zero-padded date format. However, PEP440 canonical versions have their leading zeros removed. Thus,2022.12.7
is equivalent to2022.12.07
.What makes this odd is that even on a string comparison,
2022.12.7
is greater than2022.12.07
.Environment:
The text was updated successfully, but these errors were encountered: