Skip to content

fix: use CPE target_sw to populate ecosystem to reduce FP #7139

Open

Description

@jeremylong

The NVD has some CVEs such as https://nvd.nist.gov/vuln/detail/CVE-2022-31115, that use the target_sw to specify the runtime (e.g. ruby, java, etc.). This can be used to populate the ecosystem used to reduce false positives in the ODC analysis. See org.owasp.dependencycheck.data.nvd.ecosystem.CveEcosystemMapper.

Activity

  1. changed the title [-]feat: use CPE target_sw to populate ecosystem to reduce FP[/-] [+]fix: use CPE target_sw to populate ecosystem to reduce FP[/+] on Nov 7, 2024
  2. OrangeDog commented on Nov 13, 2024

    @OrangeDog
    Contributor

    This would fix e.g. #3460, #3876, #6851, and allow a general cleanup of bundled suppressions.

  3. Akhil-1527 commented on Sep 29, 2026

    @Akhil-1527

    Hi @jeremylong, I'd like to pick this up if it's still wanted.

    Here's my plan:

    1. CveItemOperator.extractEcosystem already maps target_sw to an ecosystem when the database is built, but NvdCveAnalyzer.ecosystemMatchesTargetSoftware only checks target_sw for Node.js dependencies and lets everything else through. I'd move the target_sw mapping into one shared place (adding rust, which isn't mapped yet) and have the analyzer drop a vulnerable software entry when target_sw names a different language runtime than the dependency's ecosystem. *, -, values that map to native (like linux or c/c++) and anything unmapped would keep matching like today, and the Node.js behavior stays the same.
    2. For Java dependencies I'd still let node.js and JavaScript entries match, since webjars ship npm packages inside jars and those CVEs shouldn't disappear. Happy to drop that exception if you see it differently.
    3. Unit tests built from False Positive on elastic-apm-agent #3876 (CVE-2019-7617 is cpe:2.3:a:elastic:apm_agent:*:*:*:*:*:python:*:* but was reported on the Java agent) and [FP]: Rust vulnerability CVE-2020-36448 has resurfaced, this time on dependency cache4k-jvm, even with latest (10.0.3) Dependency Check version #6851 (CVE-2020-36448 is cpe:2.3:a:cache_project:cache:*:*:*:*:*:rust:*:* but was reported on cache4k-jvm).

    I'd leave removing the bundled suppressions this makes redundant to a separate PR, unless you'd rather see it in the same one. Does that sound right?

  4. neilscallywag commented on Oct 10, 2026

    @neilscallywag

    ^ Bump, This has been bugging my team for a while as well and takes up a bit of our time doing due diligence. Would be keen to help as well.

  5. Akhil-1527 commented on Oct 11, 2026

    @Akhil-1527

    @neilscallywag I've opened #8834 for this. If you can try it on a project that's been hitting these false positives, feedback is welcome.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions