Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When creating an SPDX sbom, some of the contained relationships are incorrect.
For example, for the npm/cli repository, the following relationship is determined:
{
"spdxElementId": "SPDXRef-Package-npm-10.1.0",
"relatedSpdxElement": "SPDXRef-Package-npmcli.eslint-config-4.0.2",
"relationshipType": "DEV_DEPENDENCY_OF"
}
Expected Behavior
According to the SPDX specification, the relationship should point in the other direction:
{
"spdxElementId": "SPDXRef-Package-npmcli.eslint-config-4.0.2",
"relatedSpdxElement": "SPDXRef-Package-npm-10.1.0",
"relationshipType": "DEV_DEPENDENCY_OF"
}
Steps To Reproduce
- Clone the latest unstable master of npm/cli repository according to the contributing manual
- Create an SPDX sbom with
node . sbom --sbom-format spdx
- Search for any relationships with
"relationshipType": "DEV_DEPENDENCY_OF"
- Compare the identified relationships with those specified in the respective package.json files
Environment
- npm: 10.2.0
- Node.js: 18.12.1
- OS Name: macOS Ventura 13.4
- System Model Name: Irrelevant
- npm config: Irrelevant
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When creating an SPDX sbom, some of the contained relationships are incorrect.
For example, for the npm/cli repository, the following relationship is determined:
{
"spdxElementId": "SPDXRef-Package-npm-10.1.0",
"relatedSpdxElement": "SPDXRef-Package-npmcli.eslint-config-4.0.2",
"relationshipType": "DEV_DEPENDENCY_OF"
}
Expected Behavior
According to the SPDX specification, the relationship should point in the other direction:
{
"spdxElementId": "SPDXRef-Package-npmcli.eslint-config-4.0.2",
"relatedSpdxElement": "SPDXRef-Package-npm-10.1.0",
"relationshipType": "DEV_DEPENDENCY_OF"
}
Steps To Reproduce
node . sbom --sbom-format spdx"relationshipType": "DEV_DEPENDENCY_OF"Environment