Skip to content

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

Open
MarvMa wants to merge 12 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 12 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 24077258119

Coverage increased (+0.04%) to 70.681%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

54 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 11 69.23%
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/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%
com/devonfw/tools/ide/url/tool/pycharm/PycharmUrlUpdater.java 2 80.0%

Coverage Stats

Coverage Status
Relevant Lines: 14778
Covered Lines: 10886
Line Coverage: 73.66%
Relevant Branches: 6560
Covered Branches: 4196
Branch Coverage: 63.96%
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

@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.

@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.

@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.

Comment on lines +19 to +24
@Override
protected String getEdition() {

return "java";
}

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.

The method getEdition() defaults to the same value as getTool(). We only need to override for special editions.

Suggested change
@Override
protected String getEdition() {
return "java";
}

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