Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ecosyste.ms API returns invalid URL in repo_metadata.owner_record.website #102

Open
d-mankowski-synerise opened this issue Jan 17, 2025 · 0 comments

Comments

@d-mankowski-synerise
Copy link

d-mankowski-synerise commented Jan 17, 2025

Very similar to #84 and #96:

❯ curl -sS -G --data-urlencode "purl=pkg:npm/[email protected]" 'https://packages.ecosyste.ms/api/v1/packages/lookup'  \
| jq -r '.[].repo_metadata.owner_record.website'                                

JavaScript Testing utilities for React

and it ends up in supplier's url section:

❯ parlay ecosystems enrich sbom.json > sbom-enriched.json                                                                                                                                                        ()

~
❯ cat sbom-enriched.json| grep -C10 'JavaScript Testing utilities for React'                                                                                                                                     ()
                {
                    "name": "ecosystems:topic",
                    "value": "javascript"
                }
            ]
        },
        {
            "bom-ref": "pkg:npm/[email protected]",
            "type": "library",
            "supplier": {
                "name": "enzyme - JavaScript Testing utilities for React",
                "url": [
                    "JavaScript Testing utilities for React"
                ]
            },

Trying to upload enriched SBOM to Dependency-Track fails with the following error:

{
    "status": 400,
    "title": "The uploaded BOM is invalid",
    "detail": "Schema validation failed",
    "errors": [
        "$.components[1233].supplier.url[0]: does not match the iri-reference pattern must be a valid RFC 3987 IRI-reference",
        "$.components[1234].supplier.url[0]: does not match the iri-reference pattern must be a valid RFC 3987 IRI-reference",
        "$.components[1888].supplier.url[0]: does not match the iri-reference pattern must be a valid RFC 3987 IRI-reference"
    ]
}

Using the latest parlay, which includes fixes for both #84 and #96:

❯ parlay --version                                                                                                                                                                                               ()
0.7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant