Skip to content
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

show-fixed-kernel-cve: use Python interpreter #163

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion show-fixed-kernel-cves.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

"""
Helper to show which Linux kernel CVEs got fixed in a given version

Expand Down Expand Up @@ -102,4 +104,4 @@ def fixed_linux_cves(f, t):

cves = fixed_linux_cves(Version(options.from_version), Version(options.to_version))
if len(cves) > 0:
print(f"- Linux ({cves})")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we dropping the - Linux here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question :D I discovered yesterday that this script is actually used in our CI and it's called via show-changes here:

KERNEL_ENTRIES=$("${SCRIPTFOLDER}"/show-fixed-kernel-cves.py -f "${FROM_KERNEL}" -t "${TO_KERNEL}")
if [ "${KERNEL_ENTRIES}" != "" ]; then
echo "- Linux (${KERNEL_ENTRIES})"

The - Linux (...) is already present in this case, and I minimize the changes.

print(f"{cves}")