bug(java): use artifactId
and groupId
from purl
in sbom
mode
#7007
Labels
kind/bug
Categorizes issue or PR as related to a bug.
scan/sbom
Issues relating to SBOM
scan/vulnerability
Issues relating to vulnerability scanning
Milestone
Description
pom.xml
files can contain name field.name
is not always equal toartifactId
.spdx-maven-plugin uses
name
field (if it exists) as package name field.So when
name
!=artifactId
- we can't correctly detect vulnerabilities for this package.We don't have problem with
CycloneDX
, because cyclonedx-maven-plugin usesartifactId
as component name field.Maven packages must use lowercase for artifactId(but there is no such rule for
groupId
), but maven purl type has no lowercase restrictions - so we can takeartifactId
andgroupId
frompurl
.This will fix problem with
SPDX
and we won't see problem withCycloneDX
ifcyclonedx-maven-plugin
updates their logic.example:
SPDX package:
CycloneDX component:
Discussed in #6990
The text was updated successfully, but these errors were encountered: