ci: fix FP ops workflow to generate CPE regex for optional suffix matches#8531
Open
chadlwilson wants to merge 1 commit into
Open
ci: fix FP ops workflow to generate CPE regex for optional suffix matches#8531chadlwilson wants to merge 1 commit into
chadlwilson wants to merge 1 commit into
Conversation
…matching Signed-off-by: Chad Wilson <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the “false-positive-ops” GitHub Actions workflow to generate regex-based CPE suppression entries instead of fixed CPE prefixes, improving matching flexibility for false positive suppression comments.
Changes:
- Refactors CPE parsing into
vendor/productextraction and builds a regex CPE matcher. - Updates suppression comment XML to mark the CPE element as
regex="true". - Removes a debug
console.log(cpe).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 of Change
As changed already for the existing suppressions in #8522; converts the workflow to generate regexes for CPE matches, to reduce false negatives due to matching only partial CPE
productfields.The previous strategy with trailing
:doesn't work, because current ODC prefix matches will fail to match any CPE identifiers that use "up to/starts with" type constraints and thus typically have no values inversion/target_swetc etc fields. In CPE 2.2 URIs these get truncated, so naive string prefix matches became indeterminate.I'll introduce support to do stricter CPE part matches in a PR, but we won't be able to use that for hosted suppressions unless we make some breaking change/force update at some point, so need to keep using regex for now.
Related issues
Have test cases been added to cover the new functionality?
no