Bug 16159

Summary: files names in dscription field come in Random order
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Andrew Fenner <Andrew.fenner>
Component: Scripts and ToolsAssignee: Unassigned <unassigned>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: mathieu.dubois-briand, randy.macleod, ross.burton
Version: 6.0   
Target Milestone: 6.0 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Andrew Fenner 2026-02-04 09:30:33 UTC
When generating CVE report using scripts/contrib/improve_kernel_cve_report.py at times there is a list of files in the description field 

line 109:
 "description": f"Source code not compiled by config. {affected_files}"

the variable is an unsorted set and this results in the output being "random"

This can make comparisons of one build to another unnecessary complicated.

I think we can just have 
 "description": f"Source code not compiled by config. {sorted(affected_files)}"

to fix the sequence order
Comment 1 Randy MacLeod 2026-02-05 15:37:26 UTC
Andrew, can you send a patch?
https://docs.yoctoproject.org/contributor-guide/index.html
Comment 2 Andrew Fenner 2026-02-05 15:46:57 UTC
already done by my colleague Daniel Turull

daniel.turull@ericsson.com

​openembedded-core@lists.openembedded.org​
​Daniel Turull;​
Andrew Fenner​
From: Daniel Turull <daniel.turull@ericsson.com>

Sorting the set so the that output is predictable

Signed-off-by: Andrew Fenner <andrew.fenner@est.tech>
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
 scripts/contrib/improve_kernel_cve_report.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py
index 3a15b1ed26..27ebed2cbd 100755
--- a/scripts/contrib/improve_kernel_cve_report.py
+++ b/scripts/contrib/improve_kernel_cve_report.py
@@ -106,7 +106,7 @@ def get_kernel_cves(datadir, compiled_files, version):
                     "status": "Ignored",
                     "detail": "not-applicable-config",
                     "summary": description,
-                    "description": f"Source code not compiled by config. {affected_files}"
+                    "description": f"Source code not compiled by config. {sorted(affected_files)}"
                 }
                 not_applicable_config +=1
             # Check if we have backport