Skip to content

PURLS not following spec #3530

@gitgitwhat

Description

@gitgitwhat

Describe the bug
I reported on PURL issues a few years ago (#1234) and it was 'Closed as not planned.' OSV still has PURL issues and this directly impacts the usability and viability of OSV.

Here's just one example vuln report that shows a bigger issue.

https://api.osv.dev/v1/vulns/GO-2024-3321

  "affected": [
    {
      "package": {
        "name": "golang.org/x/crypto",
        "ecosystem": "Go",
        "purl": "pkg:golang/golang.org/x/crypto"

The PURL is not formatted properly because according to the spec (https://github.com/package-url/purl-spec/blob/main/PURL-SPECIFICATION.rst) A name must be a percent-encoded string

So the valid PURL in this case is pkg:golang/golang.org/x%2fcrypto

Not sure what the point of having a spec is if it is not followed because it's going to break tools that do.

To Reproduce

Expected behaviour
Follow the spec.

Screenshots
N/A

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions