lib: spdx30_tasks: Handle patched CVEs
PATCH 1/1 lib: spdx30_tasks: Handle patched CVEs
The code to iterate over patched CVEs (e.g. those patched by a .patch file in SRC_URI) was accidentally omitted when writing the SPDX 3 handling. Add it in now
[YOCTO #15789]
--- meta/lib/oe/spdx30_tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+)
meta/lib/oe/spdx30_tasks.py +10 -0
@@ -498,6 +498,16 @@ def create_spdx(d): # Add CVEs cve_by_status = {} if include_vex != "none": + for cve in oe.cve_check.get_patched_cves(d): + spdx_cve = build_objset.new_cve_vuln(cve) + build_objset.set_element_alias(spdx_cve) + + cve_by_status.setdefault("Patched", {})[cve] = ( + spdx_cve, + "patched", + "", + ) + for cve in d.getVarFlags("CVE_STATUS") or {}: decoded_status = oe.cve_check.decode_cve_status(d, cve)
Signature · 1 line
2.47.1
Quoted 30 lines · Joshua Watt via lists.openembedded.org
The code to iterate over patched CVEs (e.g. those patched by a .patch file in
SRC_URI) was accidentally omitted when writing the SPDX 3 handling. Add it in now[YOCTO #15789]
Signed-off-by Joshua Watt <[email protected]>---
meta/lib/oe/spdx30_tasks.py | 10 ++++++++++1 file changed, 10 insertions(+)meta/lib/oe/spdx30_tasks.py +0
-0@@ -498,6 +498,16 @@ def create_spdx(d): # Add CVEs cve_by_status = {}if
include_vex!= "none":
+ for cve inoe.cve_check.get_patched_cves(d):
+spdx_cve=build_objset.new_cve_vuln(cve)+build_objset.set_element_alias(spdx_cve)meta/lib/oe/spdx30_tasks.py +7
-0+ + cve_by_status.setdefault("Patched", {})[cve] = ( + spdx_cve, + "patched", + "", + ) +
Quoted 3 lines
for cve in
d.getVarFlags("CVE_STATUS")or {}:
decoded_status=oe.cve_check.decode_cve_status(d, cve)
I worry this has increased the build time by around 10 mins (~25%):
Cheers,
Richard
Quoted 39 lines · Richard Purdie
Quoted 23 lines · Joshua Watt via lists.openembedded.org
The code to iterate over patched CVEs (e.g. those patched by a .patch file in
SRC_URI) was accidentally omitted when writing the SPDX 3 handling. Add it in now[YOCTO #15789]
Signed-off-by Joshua Watt <[email protected]>--- meta/lib/oe/spdx30_tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+)meta/lib/oe/spdx30_tasks.py +3
-0@@ -498,6 +498,16 @@ def create_spdx(d): # Add CVEs cve_by_status = {} if include_vex != "none": + for cve in oe.cve_check.get_patched_cves(d): + spdx_cve = build_objset.new_cve_vuln(cve) + build_objset.set_element_alias(spdx_cve)meta/lib/oe/spdx30_tasks.py def create_spdx(d): · line 513
Quoted 10 lines
meta/lib/oe/spdx30_tasks.py +7
-0+ + cve_by_status.setdefault("Patched", {})[cve] = ( + spdx_cve, + "patched", + "", + ) + for cve in d.getVarFlags("CVE_STATUS") or {}: decoded_status = oe.cve_check.decode_cve_status(d, cve)I worry this has increased the build time by around 10 mins (~25%):
Ok. Let me see what I can do about that
Quoted 8 lines
Cheers,
Richard
Hi,
Quoted 42 lines · Joshua Watt via lists.openembedded.org
Quoted 39 lines · Richard Purdie
Quoted 23 lines · Joshua Watt via lists.openembedded.org
The code to iterate over patched CVEs (e.g. those patched by a .patch file in
SRC_URI) was accidentally omitted when writing the SPDX 3 handling. Add it in now[YOCTO #15789]
Signed-off-by Joshua Watt <[email protected]>--- meta/lib/oe/spdx30_tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+)meta/lib/oe/spdx30_tasks.py +3
-0@@ -498,6 +498,16 @@ def create_spdx(d): # Add CVEs cve_by_status = {} if include_vex != "none": + for cve in oe.cve_check.get_patched_cves(d): + spdx_cve = build_objset.new_cve_vuln(cve) + build_objset.set_element_alias(spdx_cve)meta/lib/oe/spdx30_tasks.py def create_spdx(d): · line 513
Quoted 10 lines
meta/lib/oe/spdx30_tasks.py +7
-0+ + cve_by_status.setdefault("Patched", {})[cve] = ( + spdx_cve, + "patched", + "", + ) + for cve in d.getVarFlags("CVE_STATUS") or {}: decoded_status = oe.cve_check.decode_cve_status(d, cve)I worry this has increased the build time by around 10 mins (~25%):
Quoted 4 lines
Ok. Let me see what I can do about that
Yes please. I think the kernel build time increase from ~4 minutes to ~16 minutes is what I saw in my local builds. Both kernel and image builds are affected by these SDPX CVE data changes, as we discussed yesterday on #yocto irc.
Cheers,
-Mikko