Skip to content

ci: fix FP ops workflow to generate CPE regex for optional suffix matches#8531

Open
chadlwilson wants to merge 1 commit into
dependency-check:mainfrom
chadlwilson:switch-fp-automation-to-cpe-regexes
Open

ci: fix FP ops workflow to generate CPE regex for optional suffix matches#8531
chadlwilson wants to merge 1 commit into
dependency-check:mainfrom
chadlwilson:switch-fp-automation-to-cpe-regexes

Conversation

@chadlwilson
Copy link
Copy Markdown
Collaborator

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 product fields.

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 in version/target_sw etc 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

@chadlwilson chadlwilson requested a review from Copilot May 21, 2026 06:43
@chadlwilson chadlwilson changed the title ci: convert FP Report approvals workflow to generate CPE regex for optional suffix matches ci: convert FP ops workflow to generate CPE regex for optional suffix matches May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

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/product extraction 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.

Comment thread .github/workflows/false-positive-ops.yml
Comment thread .github/workflows/false-positive-ops.yml
Comment thread .github/workflows/false-positive-ops.yml
@chadlwilson chadlwilson changed the title ci: convert FP ops workflow to generate CPE regex for optional suffix matches ci: fix FP ops workflow to generate CPE regex for optional suffix matches May 21, 2026
@chadlwilson chadlwilson added the github_actions Pull requests that update Github_actions code label May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants