feat(policy): add matches/no match operators and syntax tooltip for Vulnerability ID conditions#1653
Open
schennamaneni-godaddy wants to merge 2 commits into
Open
Conversation
…ditions Expose the MATCHES and NO_MATCH operators for the Vulnerability ID policy subject (previously limited to IS / IS_NOT), and show a tooltip explaining the supported wildcard and regular-expression syntax when either operator is selected.
…olicy feat(policy): matches/no_match operators for vulnerability ID
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
3 tasks
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.
Description
The Vulnerability ID policy subject currently offers only the
Is/Is notoperators in the condition editor. This change also exposes theMatchesandDoes not matchoperators for that subject, and displays a tooltip on the value input explaining the supported wildcard (*) and regular-expression syntax when either operator is selected.This is the frontend counterpart to the backend change that adds
MATCHES/NO_MATCHevaluation forVULNERABILITY_IDconditions (DependencyTrack/dependency-track). Without it, the operators are accepted by the API but not selectable in the UI.Addressed Issue
DependencyTrack/dependency-track#6629
Additional Details
Implementation adds an
objectAndRegexOperatorsset (IS / IS_NOT / MATCHES / NO_MATCH) used by theVULNERABILITY_IDsubject, and extendsvalueInputTooltip()to return avulnerability_id_pattern_tooltipstring for the MATCHES / NO_MATCH operators. Theoperator.matchesandoperator.no_matchlabels already exist; only the new tooltip key was added (English locale).Checklist