Closed elanzini closed 3 years ago
The PurlMapper class handles the logic of this component. There are 3 maps kept cached that support the process:
PurlMapper
mavenMap
repo_url -> purl
pypiMap
cpeMap
cpe_base -> repo_url
This allows us to guess in two cases:
base_repo
cpeMap & (pypiMap | mavenMap)
A special treatment is given to the apache projects, which are heuristically assumed to follow this rule of thumb: org.apache.<project>:<project>.
apache
org.apache.<project>:<project>
The
PurlMapper
class handles the logic of this component. There are 3 maps kept cached that support the process:mavenMap
:repo_url -> purl
- extracted from pom.xml of entire Maven ecosystempypiMap
:repo_url -> purl
- extracted from PyPI json API of entire PyPI ecosystemcpeMap
:cpe_base -> repo_url
- extracted from NVD CPE dictionaryThis allows us to guess in two cases:
base_repo
of the vulnerability and we can find it in the mapscpeMap & (pypiMap | mavenMap)
A special treatment is given to the
apache
projects, which are heuristically assumed to follow this rule of thumb:org.apache.<project>:<project>
.