Commit 90b41d9
authored
fix: prevent multiple, duplicate build-system entries (#1355)
PR #1349, for some projects, ends up creating multiple duplicate
`build-system` external references. The fix is to ensure we have not
already added an external reference of type: `build-system`.
With the current implementation, I've seen the plugin produce records
like:
```json
"externalReferences": [
{
"url": "https://some.build.system.internal/job/88",
"type": "build-system",
"comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
},
{
"url": "https://some.internal.vcs/org/repo",
"type": "vcs",
"comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentVCS\""
},
{
"url": "https://some.build.system.internal/job/88",
"type": "build-system",
"comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
},
{
"url": "https://some.build.system.internal/job/88",
"type": "build-system",
"comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
},
{
"url": "https://some.build.system.internal/job/88",
"type": "build-system",
"comment": "as declared via cyclonedx-webpack-plugin config \"rootComponentBuildSystem\""
}
]
```
fixes #1356
Signed-off-by: Jeremy Long <[email protected]>1 parent ca1291f commit 90b41d9
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
| |||
0 commit comments