Repository navigation
Resolves #110, #111, #112, #113, and #114: Fix CPE matching compatibility and applicability edge cases - #117
Merged
Merged
Conversation
jdaigneau5
approved these changes
Aug 3, 2026
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.
Summary
Resolves #110, #111, #112, #113, and #114
This branch corrects CPE Name applicability and version comparison edge cases, aligning
/searchbehavior with the CPE 2.3 specification and observed NVD API behavior.Changes
Align CPE NA Range Matching With NVD
-as not applicable rather than as an ordinary version string.-.-boundaries.Primary files:
utils/cpe.jsutils/cpe.test.jscontrollers/searchController.test.jsREADME.mdroutes/swagger.jsapi-docs/openapi.jsonApply Semantic Version Qualifier Ordering
alpha/abeta/bmilestone/mrc/crsnapshotga/final/releasesphf, ordered lexically after known qualifiers1.0.0-rc1as earlier than1.0.0.1.0.0-sp1and1.0.0-hf1as later than1.0.0.cpeName,virtualMatchStringranges, and range validation.Primary files:
utils/cpe.jsutils/cpe.test.jscontrollers/middleware.test.jsroutes/swagger.jsapi-docs/openapi.jsonREADME.mdCorrelate All CPE Components
*as broad matches.Primary files:
utils/cpe.jsutils/cpe.test.jscontrollers/searchController.test.jsroutes/swagger.jsapi-docs/openapi.jsonREADME.mdMake CPE Literal Matching Case-Insensitive
macosto match stored criteria containingmacOS.cpeName,virtualMatchString, exact versions, and range matching.case_insensitive: trueto CPE-specific OpenSearch prefix and regular-expression candidate queries.Primary files:
utils/cpe.jsutils/searchQueryBuilder.jsutils/cpe.test.jsutils/searchQueryBuilder.test.jscontrollers/searchController.test.jsroutes/swagger.jsapi-docs/openapi.jsonREADME.mdDocument Leading-Zero Range Behavior
1.0.04.001and1.0.4.1remain distinct.6.1is treated as earlier than an exclusive6.02boundary.Primary files:
utils/cpe.test.jscontrollers/searchController.test.jsREADME.mdroutes/swagger.jsapi-docs/openapi.jsonapi-docs/openapi.test.js