Skip to contentSkip to conversation

python3-pytest: add CVE_PRODUCT

PATCH In review Emil Kronborg 3 participants 5 messages Mar 20, 2024 – Mar 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 python3-pytest: add CVE_PRODUCT

For some reason, the CVE product is just called py and not pytest in the NIST NVD database. Since the database only accept keywords with at least 3 characters, the CVE vendor must also be specified.

---
Changes in v2:
- I forgot to sign the first version.

 meta/recipes-devtools/python/python3-pytest_8.0.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/python/python3-pytest_8.0.2.bb +2 -0
index 57e979e909c3..080b89ebdd5e 100644
@@ -5,6 +5,8 @@ DESCRIPTION = "The pytest framework makes it easy to write small tests, yet scal
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bd27e41b6550fe0fc45356d1d81ee37c"
 
+CVE_PRODUCT = "pytest:py"
+
 SRC_URI[sha256sum] = "d4051d623a2e0b7e51960ba963193b09ce6daeb9759a451844a21e4ddedfc1bd"
 
 DEPENDS += "python3-setuptools-scm-native"
Signature · 1 line
2.44.0
#1 lore raw
Quoted 27 lines · Emil Kronborg via lists.openembedded.org

For some reason, the CVE product is just called py and not pytest in the
NIST NVD database. Since the database only accept keywords with at least
3 characters, the CVE vendor must also be specified.

---
Changes in v2:
- I forgot to sign the first version.

 meta/recipes-devtools/python/python3-pytest_8.0.2.bb | 2 ++

 1 file changed, 2 insertions(+)
meta/recipes-devtools/python/python3-pytest_8.0.2.bb +0 -0
index 57e979e909c3..080b89ebdd5e 100644
@@ -5,6 +5,8 @@ DESCRIPTION = "The pytest framework makes it easy to

write small tests, yet scal
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=bd27e41b6550fe0fc45356d1d81ee37c"

meta/recipes-devtools/python/python3-pytest_8.0.2.bb +2 -0
+CVE_PRODUCT = "pytest:py"
+
Quoted 4 lines

 SRC_URI[sha256sum] = "d4051d623a2e0b7e51960ba963193b09ce6daeb9759a451844a21e4ddedfc1bd"
 DEPENDS += "python3-setuptools-scm-native"

I worry this is a misfiled CPE rather than general statement that they'd always use this for pytest CVEs. We might want to talk to them about tweaking it to be consistent? I'm certainly unsure about taking this patch as it might mask future issues?

Cheers,

Richard

#2 lore raw
Quoted 4 lines · Richard Purdie

I worry this is a misfiled CPE rather than general statement that they'd always use this for pytest CVEs. We might want to talk to them about tweaking it to be consistent? I'm certainly unsure about taking this patch as it might mask future issues?

I made a mistake. This CPE belongs to the py project by pytest [1]. The vendor name being http://pytest.org tricked me. Searching for pytest in the NIST NVD database yields a single CPE: pytest:py, so I think it is fine to keep it as is, even though a CPE might appear as pytest:pytest instead of python:pytest.

[1]: https://github.com/pytest-dev/py

Signature · 1 line
Emil Kronborg
#3 lore raw
In reply to Emil Kronborg
Quoted 4 lines · Emil Kronborg via lists.openembedded.org

For some reason, the CVE product is just called py and not pytest in the NIST NVD database. Since the database only accept keywords with at least 3 characters, the CVE vendor must also be specified.

I can only find two CVEs with the CPE pytest:py and either of them are actually related to the pytest package:

https://nvd.nist.gov/vuln/detail/CVE-2020-29651
https://nvd.nist.gov/vuln/detail/CVE-2022-42969

These issues relate to https://github.com/pytest-dev/py which is not pytest.

Ross