feat(heureka): add change severity mitigation action - #1894
Open
hodanoori wants to merge 10 commits into
Open
Conversation
Add a new 'Change Severity' mitigation option in the popup menu of each vulnerability row on the image details page, alongside the existing FalsePositive, RiskAcceptance, and MitigateManually actions. - Add ChangeSeverityModal with a severity dropdown (SeverityValues enum), user ID, expiration date, and description fields - Uses RemediationTypeValues.Rescore for the API call with the selected severity as the override value - Wire onChangeSeveritySuccess callback through IssuesDataRow → IssuesDataRows → VulnerabilitiesTabContent → ImageIssuesList Signed-off-by: Hoda Noori <hoda.noori@sap.com>
Signed-off-by: Hoda Noori <hoda.noori@sap.com>
Signed-off-by: Hoda Noori <hoda.noori@sap.com>
🦋 Changeset detectedLatest commit: fb2ad3a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new “Change Severity” (rescore) remediation flow to image vulnerability rows, including a dedicated modal and wiring through existing list/row components.
Changes:
- Thread
onChangeSeveritySuccesscallback throughImageIssuesList → IssuesDataRows → IssuesDataRow. - Add “Change Severity” action to the row popup menu and open a new modal on selection.
- Introduce
ChangeSeverityModalUI that builds aRemediationInputof typeRescoreand submits it via existing remediation handler.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/heureka/src/components/Service/ImageDetails/ImageIssuesList/index.tsx | Adds success callback and success message for severity changes. |
| apps/heureka/src/components/Service/ImageDetails/ImageIssuesList/IssuesDataRows/index.tsx | Wires new success callback through list rows. |
| apps/heureka/src/components/Service/ImageDetails/ImageIssuesList/IssuesDataRows/IssuesDataRows.test.tsx | Updates test render helpers with the new required prop. |
| apps/heureka/src/components/Service/ImageDetails/ImageIssuesList/IssuesDataRows/IssuesDataRow/index.tsx | Adds menu item and renders the new ChangeSeverityModal. |
| apps/heureka/src/components/Service/ImageDetails/ChangeSeverityModal/index.tsx | New modal implementation for rescore remediation input + validation. |
| .changeset/heureka-change-severity-action.md | Changeset entry documenting the new action. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Hoda Noori <hoda.noori@sap.com>
- Guard all post-await state updates with isMountedRef.current to prevent React warnings on unmounted component - Add ChangeSeverityModal.test.tsx covering: required-field validation, onConfirm payload shape, API error display, and cancel/close behavior Signed-off-by: Hoda Noori <hoda.noori@sap.com>
Signed-off-by: Hoda Noori <hoda.noori@sap.com>
After a successful Rescore remediation, immediately update the images cache to reflect the new severity on the affected vulnerability. This makes the Remediated tab show the rescored severity without waiting for the backend cache to expire. Also fix test assertion that was too broad (getByText(/High/) matched multiple elements including the severity dropdown option). Signed-off-by: Hoda Noori <hoda.noori@sap.com>
Signed-off-by: Hoda Noori <hoda.noori@sap.com>
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
Adds a new "Change Severity" action to the vulnerability popup menu on the image details page, alongside the existing False Positive, Accept Risk, and Mitigate Manually actions. This allows users to rescore a vulnerability's severity level by creating a remediation record of type
Rescorewith the new severity value.Changes Made
ChangeSeverityModalcomponent with a severity dropdown (Select), user ID, expiration date, and description fields — usesRemediationTypeValues.Rescoreand sends the selectedSeverityValuesas the severity overrideIssuesDataRowonChangeSeveritySuccesscallback throughIssuesDataRows→VulnerabilitiesTabContent→ImageIssuesListIssuesDataRowstests to include the new requiredonChangeSeveritySuccesspropRelated Issues
Screenshots (if applicable)
Testing Instructions
pnpm ipnpm TASKChecklist
PR Manifesto
Review the PR Manifesto for best practises.