-
Notifications
You must be signed in to change notification settings - Fork 213
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
CVEs landing page redesign #13382
CVEs landing page redesign #13382
Conversation
Demo starting at https://ubuntu-com-13382.demos.haus |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## cve-overhaul #13382 +/- ##
=============================================
Coverage 74.41% 74.41%
=============================================
Files 107 107
Lines 2838 2838
Branches 946 946
=============================================
Hits 2112 2112
Misses 702 702
Partials 24 24 |
Other than that, great work. Love how the cards downscale now on smaller viewports :) |
9285553
to
52eb415
Compare
This reverts commit 52eb415.
dbfb1a8
to
a9b088d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple minor comments but looks good to me
</div> | ||
<div class="col-3 col-medium-2"> | ||
{% set status = cve.summarized_status %} | ||
{% if status.name == "Some fixed" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the 'status.name' values set? Is it possible they could include variations of capitalization, trailing white-space etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're set in the get_summarized_statuses
function in the helpers.py file. The names are hard coded depending on which check is valid for the cve as a whole, so no white spaces or variations in capitalization, eg from line 55:
cve["summarized_status"] = {
"name" : "Some fixed",
"fixed_count" : total_fixed,
"total_count" : total_fixable
}
templates/security/cve/index.html
Outdated
{% elif loop.index == 6 %} | ||
and {{ cve.packages | length - 5 }} more | ||
{% endif %} | ||
{% elif cve.packages | length < 6 %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% elif cve.packages | length < 6 %} | |
{% else %} |
You can assume length is small than 6 in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes lol
templates/security/cve/index.html
Outdated
<li class="p-list__item"><a href="/blog/running-openssl-1-1-1-after-eol-with-ubuntu-pro">Running OpenSSL 1.1.1 after EOL? Stay secure with Ubuntu Pro.</a></li> | ||
<li class="p-list__item"><a href="/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces">Restricted unprivileged user namespaces are coming to Ubuntu 23.10</a></li> | ||
<li class="p-list__item"><a href="/blog/securing-open-source-software-dependencies-in-the-public-cloud">Securing open source software dependencies in the public cloud</a></li> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
templates/security/cve/index.html
Outdated
</div> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the indentation is a little off here, might be missing a closing tag
webapp/security/helpers.py
Outdated
for package in cve["packages"]: | ||
# Check if all statuses for all packages are the same, excluding DNE and empty data | ||
if (len({d["status"] for d in package["statuses"] if d["status"] not in {"DNE", ""}}) == 1): | ||
# todo: set status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# todo: set status | |
# todo: set status |
do you need this still?
Done
Future work
The releases links will be handled in a separate PR, as will the advanced search link.
QA
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-5145