Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[c/c++] do not match OS packages for stdlib #788

Open
prabhu opened this issue Dec 23, 2023 · 3 comments · Fixed by #1309
Open

[c/c++] do not match OS packages for stdlib #788

prabhu opened this issue Dec 23, 2023 · 3 comments · Fixed by #1309
Assignees
Labels
Consider Funding good first issue Good for newcomers help wanted Extra attention is needed

Comments

@prabhu
Copy link
Collaborator

prabhu commented Dec 23, 2023

Tested with: https://github.com/ada-url/ada

#include <array>

It matches an OS package, which is incorrect.

{
      "group": "",
      "name": "nodejs21-devel",
      "version": "21.4.0",
      "purl": "pkg:rpm/nodejs21-devel@21.4.0#nodejs21-21.4.0-1.1.src.rpm",
      "type": "library",
      "bom-ref": "pkg:rpm/nodejs21-devel@21.4.0#nodejs21-21.4.0-1.1.src.rpm",
      "evidence": {
        "identity": {
          "field": "purl",
          "confidence": 0.8,
          "methods": [
            {
              "technique": "filename",
              "confidence": 0.8,
              "value": "PkgProvides array"
            }
          ]
        }
      }
    }

To fix this, we need a list of standard c/c++ libraries similar to Python and filter the list before looking for an OS package.

https://en.cppreference.com/w/cpp/standard_library
https://cplusplus.com/reference/

@prabhu
Copy link
Collaborator Author

prabhu commented Jul 23, 2024

https://sourceware.org/glibc/manual/2.40/html_node/File-Index.html glibc provided header files

@aryan-rajoria
Copy link
Collaborator

Tested out the changes:
bom.json
(before the changes)
sbom2.json (after the changes)
Difference using custom-json-diff:
diffs2.json
diffs2.html.json

@aryan-rajoria
Copy link
Collaborator

can we close this issue? @prabhu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Consider Funding good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants