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

Add links to releases and latest releases on vulnerabilities docs page #781

Merged

Conversation

KeplerBoyce
Copy link
Contributor

Closes #777.

Adds links to each package release and the latest releases on the vulnerabilities docs page. This also adds notes under vulnerabilities that can be resolved by upgrading to the latest version.

Example:

vulns

@KeplerBoyce
Copy link
Contributor Author

Also, the osv.dev api no longer returns any vulnerabilities for those three packages (caddy, logrotate, and grafana) which previously returned vulnerabilities. This seems like it might have been a bug in the osv.dev api, as the versions of the packages shouldn't be affected by those CVEs (e.g. grafana build 2266 used grafana version 10.4.2, but the CVE says it only affects up through version 7.0.1. I just used the previous zopen_vulnerability.json that had CVEs for those three packages to see an example of what the markdown would look like.

@@ -88,9 +115,22 @@ def format_quantities(cves):
for release, cves in releases.items():
# Dropdown for each release -- expand to show vulnerabilities
file.write(f"<details>\n<summary>{release} -- {format_quantities(cves)}</summary>\n\n")

# Url of release page and url of latest release (if this is not the latest release)
file.write(f"- Release URL: [{release}]({release_urls[release]})\n\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest changing this to Affected Release URL

# Show if this vulnerability is resolved in the latest release
if (release != latest_release_info[pkg]['name'] and
cve['id'] not in latest_release_info[pkg]['cve_ids']):
file.write(" - **This vulnerability is resolved in the latest release.**\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering if we should turn "latest release" into a link here and potentially remove the "Latest URL" link above.

Would if it would also be possible to report if there is no known fix yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about this format?

If it is the latest release, you can use the affected release URL above, and otherwise, it provides the latest release URL below every vulnerability and says whether the vuln has been resolved or not.

newvulns

Copy link
Collaborator

Choose a reason for hiding this comment

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

Love it!

@IgorTodorovskiIBM
Copy link
Collaborator

Great additions!

@v1gnesh
Copy link
Collaborator

v1gnesh commented Jun 7, 2024

If possible, please add placeholders to begin using package names in this format. Either in this PR or later.
Example: zstd-1.5.5-4.zos.s390x.pax.zst

Copy link
Collaborator

@IgorTodorovskiIBM IgorTodorovskiIBM left a comment

Choose a reason for hiding this comment

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

LGTM

@IgorTodorovskiIBM IgorTodorovskiIBM merged commit 7afd6ce into zopencommunity:main Jun 7, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvements to vulnerabilities page on docs
3 participants