-
Notifications
You must be signed in to change notification settings - Fork 506
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
Add product synonyms #2819
Comments
The checkers already do have synonyms in that they support multiple {vendor, product} pairs. I'm wondering if maybe we should have a similar format for information for basically everything we detect. I know @anthonyharrison knows what this looks like but for the benefit of writing it out here's what this could look like with my favourite multi-name example, beautifulsoup (it's my favourite because all the names are on the website for me to cut and paste easily):
That would let us potentially map all the package pairs to nvd lookup pairs as an N:N set, which I think is something we need. The next question would be... how do we store and use this? We could potentially extend the existing checker format: class BeautifulSoupChecker(Checker):
CONTAINS_PATTERNS: list[str] = []
FILENAME_PATTERNS: list[str] = []
VERSION_PATTERNS = []
VENDOR_PRODUCT = [("crummy_not_in_db", "beautifulsoup4")]
PYPI_PACKAGE = ["beautifulsoup4", "bs4"]
DEBIAN_PACKAGE = ["python-bs4", "python3-bs4"]
FEDORA_PACKAGE = ["python-beautifulsoup4"] Some notes here:
Open questions:
|
Design goals:
|
release-monitoring.org could be helpful to retrieve the different package names or "synonyms" used by distributions. |
@ffontaine Thanks for the reference to release-monitoring.org. I note it has an API which would make integration with cve-bin-tool relatively easy although it wouldn't work in offline mode unless we could mirror a local copy of the database. |
Indeed, we're already using the API in buildroot to generate this web page: http://autobuild.buildroot.org/stats/master.html (the source code is here: https://git.buildroot.net/buildroot/tree/support/scripts/pkg-stats). I don't know if we can retrieve a local copy. |
@terriko So in that project the metadata that needs to be added can be added in the checker files of their respective products using extra parameters like LICENSE_INFO=[""] defined in it? |
Maybe. There's an open question of whether this should actually go in the checker file itself or whether it should be a separate thing, and a proposal could go either way. I'll put some more thoughts directly in the gsoc issue. |
slightly pedantic note: it appears that there is a CPE for beautifulsoup:
Although my assertion about it not having one above may have been incorrect, the fact that we'll likely recognize some number of products that don't have them stands. |
Where did you get this CPE? I didn't found it on cvedetails.com or nvd.nist.gov |
Hm, maybe ti's just what's auto-generated by the sbom tool and not a real CPE id? It's still likely more correct than my previous entry but maybe we do need to annotate these better. |
@terriko @ffontaine sbom4python autogenerates the CPE and PURL references based on the project metadata. This may not be correct but I do state this in the documentation, 'Whilst PURL and CPE references are automatically generated for each Python module, the accuracy of such references cannot be guaranteed as they are dependent on the validity of the data associated with the Python module. |
#2685 is related
Some products have multiple names and it would be good if we could handle this in an elegant way particulalry for the language and SBOM parsers although there may be some benefits for the checkers as well. My idea would be to have a list of synonyms which can be checked against.
I am thinking particulalry of Java packages which can sometimes be included as org.xxxx in a POM.XML file but it can also be referred to as xxxx.jar when scanning a directory or archive.
Thoughts?
The text was updated successfully, but these errors were encountered: