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

Allow slashes in purl package names #765

Merged
merged 1 commit into from
May 2, 2024
Merged

Conversation

juxtin
Copy link
Contributor

@juxtin juxtin commented May 2, 2024

See #764.

You are not supposed to have / characters in a package name, but people intuitively want to put them in there anyway and it's still fully possible to parse them. Since the goal of our purl handling here is maximum permissiveness within reason, I made a little tweak to the parser so that we can handle this case.

Copy link

@mrysav mrysav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kind of uncomfortable with this as it actually might take a stance on the ambiguity eg. is the namespace gopkg.in/DataDog or just gopkg.in?

However this appears to be an unresolved point of discussion in the PURL community: package-url/purl-spec#63

So I think increasing permissiveness on our end is fine.

@juxtin
Copy link
Contributor Author

juxtin commented May 2, 2024

@mrysav that's a good callout, and we may have to revisit that later if the purl-spec folks ever work this out.

@juxtin juxtin merged commit 82ab8f6 into main May 2, 2024
6 checks passed
@juxtin juxtin deleted the juxtin/allow-slashes-in-purls branch May 2, 2024 20:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants