Skip to content

incorrect purl to CPE information #31

Open

Description

@saumil9779

There are some package names - which are common between multiple languages. For example - jmespath
https://github.com/jmespath/jmespath.py
https://github.com/jmespath/jmespath.rb

Because of this - we get CPE for ruby even for a python package pypi.

https://github.com/scanoss/purl2cpe/blob/main/data/jmespath_project/jmespath/purls.yml

Is there a way to have separate CPE for individual package manager?

Activity

  1. dataanalystpro24 commented on Dec 3, 2025

    @dataanalystpro24

    Hi @saumil9779
    Head of Customer Support here. Thanks a lot for bringing this to our attention. We’re aware of this issue and we're investigating the best way to perform the matches for these cases. We’ll get back to you as soon as our team has finished discussing this topic internally.
    Thank you for your patience!

  2. dataanalystpro24 commented on Dec 4, 2025

    @dataanalystpro24

    Hi @saumil9779 , thank you again for reporting this, it's a great observation.

    In the case of jmespath, the situation comes from the structure of the official NVD data.
    At the moment, NVD provides only a single CPE for the project, and it is explicitly tied to the Ruby implementation:

    cpe:2.3:a:jmespath_project:jmespath:::::ruby::

    Since the CPE itself is Ruby-specific and no additional CPE entries exist for the Python version, SCANOSS must map all jmespath package managers (including PyPI) to the only CPE that is available in NVD.

    So currently it isn’t possible to provide separate CPEs per package manager, because those CPEs don't exist upstream.

    However, we’re reviewing internally whether we can improve how we represent these cases where the upstream CPE is implementation-specific. I’ve forwarded your report to our data and engine teams so they can evaluate possible improvements.

    Thanks again for bringing this up, it’s really helpful.

  3. isasmendiagus commented on Apr 1, 2026

    @isasmendiagus

    Hi @saumil9779,

    Thank you for the detailed report.

    We've investigated the purl2cpe dataset and can confirm that the data for jmespath is correct:

    So the mapping from pkg:pypi/jmespath to Ruby CPEs should not be happening based on this dataset.

    Could you help us understand how you're encountering this incorrect mapping? For example:

    • Are you using SCANOSS scanning (scanoss-py, IDE plugin, etc.)?
    • Are you querying the vulnerability API directly?
    • Are you looking up the purl2cpe database/SQLite file directly?

    A reproduction example (e.g. the command you ran or the API call you made) would help us pinpoint where the incorrect resolution is occurring.

    Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions