Skip to content

#1775: validate and update CPE vendor and product for all tools#1796

Open
MarvMa wants to merge 14 commits intodevonfw:mainfrom
MarvMa:bugfix/#1775-validate-cve-reportings
Open

#1775: validate and update CPE vendor and product for all tools#1796
MarvMa wants to merge 14 commits intodevonfw:mainfrom
MarvMa:bugfix/#1775-validate-cve-reportings

Conversation

@MarvMa
Copy link
Copy Markdown
Contributor

@MarvMa MarvMa commented Apr 2, 2026

This PR fixes #1775

Implemented changes:

  • updated cpe's for all products
  • removed cpe-vendor and cpe-product for tools where no cpe entry exists on nvd
  • created a shell-script to verify cpe data using a POST request with search params. (doesn't work for all the CPEs, some needed a manual check)
    collect-cpe-report.sh

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Apr 2, 2026
@MarvMa MarvMa changed the title Bugfix/#1775 validate CVE reportings #1775: validate and update CPE vendor and product for all tools Apr 2, 2026
@MarvMa MarvMa self-assigned this Apr 2, 2026
@MarvMa MarvMa added security CVEs or other vulnerabilities workflow GitHub actions (CI,CD,update urls/CVEs) labels Apr 2, 2026
@MarvMa MarvMa moved this from 🆕 New to 👀 In review in IDEasy board Apr 2, 2026
@MarvMa MarvMa requested a review from hohwille April 2, 2026 12:05
@MarvMa MarvMa moved this from 👀 In review to Team Review in IDEasy board Apr 2, 2026
@MarvMa MarvMa moved this from Team Review to 👀 In review in IDEasy board Apr 2, 2026
MarvMa and others added 2 commits April 7, 2026 09:13
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 7, 2026

Coverage Report for CI Build 24121121212

Coverage increased (+0.04%) to 70.506%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 55 coverage regressions across 12 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

55 previously-covered lines in 12 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
com/devonfw/tools/ide/url/tool/mvn/MvnUrlUpdater.java 12 0.0%
com/devonfw/tools/ide/url/tool/java/JavaUrlUpdater.java 10 68.63%
com/devonfw/tools/ide/url/tool/helm/HelmUrlUpdater.java 8 0.0%
com/devonfw/tools/ide/url/tool/jasypt/JasyptUrlUpdater.java 5 0.0%
com/devonfw/tools/ide/git/repository/RepositoryCommandlet.java 3 70.98%
com/devonfw/tools/ide/url/tool/node/NodeUrlUpdater.java 3 0.0%
com/devonfw/tools/ide/url/tool/oc/OcUrlUpdater.java 3 0.0%
com/devonfw/tools/ide/url/tool/python/PythonUrlUpdater.java 3 82.22%
com/devonfw/tools/ide/url/tool/go/GoUrlUpdater.java 2 73.33%
com/devonfw/tools/ide/url/tool/java/JavaJsonVersion.java 2 66.67%

Coverage Stats

Coverage Status
Relevant Lines: 15052
Covered Lines: 11066
Line Coverage: 73.52%
Relevant Branches: 6688
Covered Branches: 4262
Branch Coverage: 63.73%
Branches in Coverage %: Yes
Coverage Strength: 3.1 hits per line

💛 - Coveralls

@MarvMa
Copy link
Copy Markdown
Contributor Author

MarvMa commented Apr 7, 2026

Wrongly committed changes have been removed from this PR.

Copy link
Copy Markdown
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarvMa thank you for your PR. Great that you helped to improve this advanced topic.
CVE metadata is still complex and partially messy so not easy to figure out and get everything right. I also did not have it easy to do a review of your PR.
To summarize: Great job and good step forward 👍
I still cannot say that we got everything right now. However lets complete and merge and then create individual tickets for future fixes and improvements.
Have a look at my review comments, please.

@Override
public String getCpeVendor() {
return "astral-sh";
return "astral";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this change is incorrect.
See e.g. https://cveawg.mitre.org/api/cve/CVE-2025-54368

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the NVD CPE search as a single source of truth. Maybe the assumption that the search is correct might have been wrong. Here are the search results. Maybe this is not the correct tool?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion is that we refactor the approach and allow more flexibility instead of providing exactly one value for CPE vendor and product.
I see two aspects:

  1. The search criteria for CPE to find potential CVEs (should be specific but must not be exact, we could e.g. also search for anything starting with astral)
  2. Filter matching CVEs if their CPE does match. Here we could also support a Set of Strings that are accepted or we just provide a method with the CPE as argument returning a boolean that tells if we accept this as a match or not (at least for the generic API in AbstractUrlUpdater).

To make it still simple to implement an individual URL updater, we could provide a simple API where we can add vendors and products as either exact match or as infix. Example how this could look like in the future:

protected void initCpe(CpeRegistry cpe) {
  cpe.addVendor("astral");
  cpe.addVendor("astral-sh");
  cpe.addProduct("uv");
}

If no vendor or product was added the initialization of the URL updater will fail.

@Override
public String getCpeProduct() {
return "vscode";
return "visual_studio_code";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fully correct.
However, just to open some discussion...
Looking at an example:
https://cveawg.mitre.org/api/cve/CVE-2025-64660

I see this:

"vendor":"Microsoft","product":"Visual Studio Code"

But also this:

"criteria":"cpe:2.3:a:microsoft:visual_studio_code:*:*:*:*:*:*:*:*"

After digging in this CVE jungle I get the impression that the original methods getCpeProduct() and getCpeVendor() where actually planned for the properties vendor and product but later the implementation was actually based on CPE criteria property.
To make it even more complex, there are CVEs that only have vendor and product but no CPE criteria property.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly! that is very confusing. Sometimes CVEs exists for certain tools, but theres no CPE for that specific Tool. Also some CPEs are not unique and it is not as simple to find out which criteria matches the product. I validated the CPEs against the manual search of the NVD Website using the vendor and product as keywords to find the matching criteriaproperty. It seems like that this approach still misses CVEs.

I guess we should discuss if it would make sense to rethink the CVE Logic to include CVEs mapped with the criteria field and additionally CVEs just containing vendor and `product.

@Override
public String getCpeVendor() {
return "jenkinsci";
return "jenkins";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Override
public String getCpeProduct() {

return "jdk";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not convinced about this one. See e.g.
https://cveawg.mitre.org/api/cve/CVE-2025-21587

"criteria": "cpe:2.3:a:oracle:java_se:17.0.14:*:*:*:*:*:*:*"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So IMHO here we have two products: jdk and java_se.
Please have a look and see if you can agree with my observation or not.
If we agree, we maybe create a new issue for that (Support multiple values for CPE product), merge this PR and plan a new PR to fix the new issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, there is a few cases where two CPEs exist. For now i just chose one of them, but we should definitely consider adding an option to add more than one CPE 0..N for both CPE vendor and product.

MarvMa and others added 2 commits April 8, 2026 07:18
remove unused

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security CVEs or other vulnerabilities workflow GitHub actions (CI,CD,update urls/CVEs)

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Validate and Fix CPE Vendor/Product Identifiers for All Tools

3 participants