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

PackageURL type not being validated #155

Open
benmss opened this issue May 21, 2024 · 0 comments
Open

PackageURL type not being validated #155

benmss opened this issue May 21, 2024 · 0 comments

Comments

@benmss
Copy link

benmss commented May 21, 2024

The PackageURL spec includes a list of requirements for a type to be considered valid:

  • The package type is composed only of ASCII letters and numbers, '.', '+' and '-' (period, plus, and dash)

  • The type cannot start with a number

Therefore, the following should not be possible:

PackageURL.from_string("pkg:111_^5/example")
PackageURL(type='111_^5', namespace=None, name='example', version=None, qualifiers={}, subpath=None)

Spec taken from: https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst

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