-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[BUG] Relationships in SPDX sbom pointing in wrong direction #6867
Copy link
Copy link
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 10.x
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 10.x