Lead the vulnerability card with an actionability statement - #216
Merged
Conversation
The card now opens with a line that says whether updating the image helps: a warning-toned "X of Y findings can be fixed by updating this image" when findings are fixable, and a neutral "Nothing to fix right now" statement when no upstream fix exists. The separate fixable-count line is absorbed into it, and the persisted assessment message is only rendered for statuses other than "Findings detected" and "No findings" so provider errors stay visible while the redundant "reported N finding(s)" text disappears. Adds the summary-remediation classes with a dark-mode tone override. Closes #208
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
VulnerabilityAssessmentCardnow opens with a statement about what the user can do instead of burying it below the counts:FixableFindingCount > 0→ warning tone: "X of Y findings can be fixed by updating this image"FixableFindingCount == 0 && ActiveFindingCount > 0→ neutral tone: "Nothing to fix right now — no upstream fix is available for the Y known issues in this image"ActiveFindingCount == 0→ unchanged, the plain status chipThe separate "N of M active findings have a fix available" line is absorbed into the new leading line. The persisted
VulnerabilityAssessmentMessageis now rendered only for statuses other than "Findings detected" and "No findings", so provider error text on the failure paths stays visible while the redundant "reported N finding(s)" text is gone. Newsummary-remediation/summary-remediation--warningclasses inapp.csscarry the two tones, with a dark-mode override for the warning colour.Why
For a runtime container the only remedy is pulling an updated image. A card reporting
1236 activewith0 of 1236fixable was saying "there is nothing you can do" in error-coloured chips, which for a Debian-based image is the normal, healthy state. The information is worth keeping; the weighting was wrong.Linked issues
Closes #208
Review notes
VulnerabilityAssessmentViewData.FixableFindingCountalready existed.VulnerabilityDisplayFormatter.GetStatusColoris untouched — the change is the leading text line, not a recolouring.Statusas text.Follow-up work
None