Skip to content

feat(heureka): add change severity mitigation action - #1894

Open
hodanoori wants to merge 10 commits into
mainfrom
hoda-heureka-change-severity
Open

feat(heureka): add change severity mitigation action#1894
hodanoori wants to merge 10 commits into
mainfrom
hoda-heureka-change-severity

Conversation

@hodanoori

@hodanoori hodanoori commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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 Rescore with the new severity value.

Changes Made

  • Add ChangeSeverityModal component with a severity dropdown (Select), user ID, expiration date, and description fields — uses RemediationTypeValues.Rescore and sends the selected SeverityValues as the severity override
  • Add "Change Severity" menu item to the vulnerability row popup menu in IssuesDataRow
  • Wire onChangeSeveritySuccess callback through IssuesDataRowsVulnerabilitiesTabContentImageIssuesList
  • Update IssuesDataRows tests to include the new required onChangeSeveritySuccess prop

Related Issues

Screenshots (if applicable)

Testing Instructions

  1. pnpm i
  2. pnpm TASK

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.
  • I have created a changeset for my changes.

PR Manifesto

Review the PR Manifesto for best practises.

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>
@hodanoori
hodanoori requested a review from a team as a code owner August 17, 2026 10:04
Copilot AI lite review requested due to automatic review settings August 17, 2026 10:04
@changeset-bot

changeset-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fb2ad3a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-greenhouse Patch

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 onChangeSeveritySuccess callback through ImageIssuesList → IssuesDataRows → IssuesDataRow.
  • Add “Change Severity” action to the row popup menu and open a new modal on selection.
  • Introduce ChangeSeverityModal UI that builds a RemediationInput of type Rescore and 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.

Comment thread apps/heureka/src/components/Service/ImageDetails/ChangeSeverityModal/index.tsx Outdated
Signed-off-by: Hoda Noori <hoda.noori@sap.com>
@hodanoori hodanoori changed the title Hoda heureka change severity feat(heureka): add change severity mitigation action Aug 17, 2026
hodanoori and others added 3 commits August 17, 2026 13:06
- 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>
@hodanoori hodanoori self-assigned this Aug 17, 2026
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>
@hodanoori hodanoori added the greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` label Aug 18, 2026
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Aug 18, 2026
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task](heureka): Add change severity action to the list of actions in the Activated Vulnerabilities tab

2 participants