pypi.bbclass: remove vendor from CVE_PRODUCT
PATCH v2 1/1 pypi.bbclass: remove vendor from CVE_PRODUCT
By specifying the CVE vendor as python, some CVEs are not found. For instance, the CVE_PRODUCT for python3-pyopenssl becomes python:pyopenssl, which yields no matches in the NIST NVD database because the correct CVE vendor is pyopenssl.
Generally, CVE_PRODUCT ?= ${PYPI_PACKAGE}:${PYPI_PACKAGE} captures most cases. However, some package names, such as python3-pytest, are unrelated to the correct CVE product. In this case, the correct CVE vendor is pytest, but the CVE product is py, resulting in no CVEs being found. Therefore, not setting the CVE vendor is the most correct option.
---
Changes in v2:
- I forgot to sign the first version.
meta/classes-recipe/pypi.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/pypi.bbclass +1 -1
@@ -35,4 +35,4 @@ UPSTREAM_CHECK_PYPI_PACKAGE ?= "${@d.getVar('PYPI_PACKAGE').replace('_', '-')}" UPSTREAM_CHECK_URI ?= "https://pypi.org/project/${UPSTREAM_CHECK_PYPI_PACKAGE}/" UPSTREAM_CHECK_REGEX ?= "/${UPSTREAM_CHECK_PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/" -CVE_PRODUCT ?= "python:${PYPI_PACKAGE}" +CVE_PRODUCT ?= "${PYPI_PACKAGE}"
Signature · 1 line
2.44.0
Quoted 11 lines · Emil Kronborg via lists.openembedded.org
By specifying the CVE vendor as python, some CVEs are not found. For instance, the
CVE_PRODUCTfor python3-pyopenssl becomes python:pyopenssl, which yields no matches in the NIST NVD database because the correct CVE vendor is pyopenssl.Generally,
CVE_PRODUCT?= ${PYPI_PACKAGE}:${PYPI_PACKAGE} captures most cases. However, some package names, such as python3-pytest, are unrelated to the correct CVE product. In this case, the correct CVE vendor is pytest, but the CVE product is py, resulting in no CVEs being found. Therefore, not setting the CVE vendor is the most correct option.
Have you got comparison reports for a world run before and after this change so we can see what the difference is?
Ross
Quoted 1 line · Ross Burton
Have you got comparison reports for a world run before and after this change so we can see what the difference is?
No. After setting CVE_PRODUCT for around 5 python-* recipes, I noticed a pattern, which led me to pypi.bbclass. Here, I saw that the product is hardcoded to 'python', and thought it would be easier (and more correct) to fix it in a single place instead of multiple recipes.
Signature · 1 line
Emil Kronborg