CycloneDX / CycloneDX/sbom-utility

Utility does not pass a valid iri-reference as value in `externalReference` url field

Open
#119 4 comments 0 reactions 1 assignee Claimed by @mrutkows View on GitHub
invalid working as designed
Dominant language
Go
Stars
163
Forks
21
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

The value "http://private%20package/" is a valid `iri-reference`.

## Screenshots or output-paste
Problematic part of the SBOM file:
```
{
"type": "library",
"name": "utils",
"group": "@mui",
"version": "5.14.17",
"bom-ref": "pkg:npm/%40mui/utils@5.14.17?vcs_url=git%2Bhttps%3A//github.com/mui/material-ui.git#packages/mui-utils",
"author": "MUI Team",
"description": "Utility functions for React components.",
"licenses": [
{
"license": {
"id": "MIT"
}
}
],
"purl": "pkg:npm/%40mui/utils@5.14.17?vcs_url=git%2Bhttps%3A//github.com/mui/material-ui.git#packages/mui-utils",
"externalReferences": [
{
"url": "https://github.com/mui/material-ui/issues",
"type": "issue-tracker",
"comment": "as detected from PackageJson property \"bugs.url\""
},
{
"url": "git+https://github.com/mui/material-ui.git#packages/mui-utils",
"type": "vcs",
"comment": "as detected from PackageJson property \"repository.url\" and \"repository.directory\""
},
{
"url": "http://private%20package",
"type": "website",
"comment": "as detected from PackageJson property \"homepage\""
}
]
},
```

Util output:

![Image](https://github.com/user-attachments/assets/95f4bf8f-77eb-4d67-bf43-181ab0035099)

## Expected behavior

Validation passed

## Additional context

At first I thought that the problem was in the sbom file generator, and created a [issue for it](https://github.com/CycloneDX/cyclonedx-webpack-plugin/issues/1359). Perhaps it will also be interesting

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.