Skip to content

feat: disable reopen form when vuln was handled by a VEX rule#827

Open
refoo0 wants to merge 1 commit into
mainfrom
update-vex-rule-reopen-logic
Open

feat: disable reopen form when vuln was handled by a VEX rule#827
refoo0 wants to merge 1 commit into
mainfrom
update-vex-rule-reopen-logic

Conversation

@refoo0

@refoo0 refoo0 commented Jul 16, 2026

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: rafi <refaei.shikho@hotmail.com>
Copilot AI review requested due to automatic review settings July 16, 2026 14:26

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

Adds UI logic to prevent reopening a dependency vulnerability via the manual “reopen” form when it was last handled automatically by a VEX rule, guiding users to adjust/remove the VEX rule instead.

Changes:

  • Introduces isLastEventVexRule derived state to detect whether the latest relevant event came from a VEX rule.
  • Updates the closed-vuln UI to show an explanatory message instead of the reopen form when isLastEventVexRule is true.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +361 to +375
const isLastEventVexRule = useMemo(() => {
if (!vuln || !vuln.events || vuln.events.length === 0) {
return false;
}
for (let i = vuln.events.length - 1; i >= 0; i--) {
if (vuln.events[i].type === "rawRiskAssessmentUpdated") {
continue;
} else if (vuln.events[i].createdByVexRule) {
return true;
} else {
return false;
}
}
return false;
}, [vuln]);
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.

2 participants