Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensive test suite for CPE matching #2243

Closed
2 tasks done
nscuro opened this issue Dec 6, 2022 · 2 comments · Fixed by #3070
Closed
2 tasks done

Extensive test suite for CPE matching #2243

nscuro opened this issue Dec 6, 2022 · 2 comments · Fixed by #3070
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@nscuro
Copy link
Member

nscuro commented Dec 6, 2022

Current Behavior

We maintain a custom CPE matching logic, yet our test coverage is very scarce.

Making changes to the existing logic is a high risk, because we don't quite know if it negatively affects matching on real-world data.

Proposed Behavior

Setup a test suite with loads of real-world CPE data.

Note that we also pull versions information from component PURLs if the analyzed component has no CPE assigned to it, so that aspect should be covered as well.

The test subject will be the InternalAnalysisTask.

To cover as much data as possible without having to write too much code, setting up a test that just reads from a CSV file or so would be preferable.

cpe,componentCpe,componentPurl,match
cpe:2.3:a:...,cpe:2.3:a:...,,true
cpe:2.3:a:...,,pkg:maven/...,true

Checklist

@nscuro nscuro added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Dec 6, 2022
@RingoDev
Copy link
Contributor

RingoDev commented May 1, 2023

Hi, I would be interested inhelping out here. Do you have a starting point of where somebody could generate such test input data from?

Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants