WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Map products to CPE criteria, not only CPEs themselves #468

@J08nY

Description

@J08nY

Currently, when we are doing the CPE mapping, we are only mapping products to CPEs from the CPE dataset. However, when NIST issues CVEs, they sometimes specify the vulnerable configurations using criteria which specify configurations that do not match any actual CPEs in the CPE database, yet they contain basically almost all of the information that CPE contains.

Example

Take CVE-2024-45678 as an example. Here on the NIST page you can see the specified affected configurations. When you click on the "Show Matching CPEs" dropdown you will see that only 2 of the configurations actually have CPEs issued under them. However, for our purposes, the configurations specified themselves have a lot of information we could use to bind the CVE to an affected product: They have the vendor, the product, and some version range.

I do not have any numbers on the actual prevalence of this. We could run some numbers.

Implementation

Few things would need to be done to implement this:

  • Do not filter the CPEMatch dataset:
    if "matches" in m["matchString"]:
    dataset_to_fill["match_strings"][m["matchString"]["matchCriteriaId"]] = {
    "criteria": m["matchString"]["criteria"],
    "matches": m["matchString"]["matches"],
    }
    for version_key in self._VERSION_KEYS:
    if version_key in m["matchString"]:
    dataset_to_fill["match_strings"][m["matchString"]["matchCriteriaId"]][version_key] = m[
    "matchString"
    ][version_key]
  • ✅ Make some sort of "CPECriteria" dataclass that holds the information that we have. Note that the criteria may not have all of the metadata that a CPE must have, so some will be useless.
  • Generalize the CPE classifier to also support this criteria thing.
  • Hold the criteria in the CPE dataset or a separate dataset.

Wdyt, @adamjanovsky?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ccRelated to CC certificationcpeRelated to CPEscveRelated to CVEsfipsRelated to FIPS 140 certification

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions