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

Fix OCI repository URL resolution to prevent duplicate name fragments #40

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

knqyf263
Copy link
Contributor

@knqyf263 knqyf263 commented Jul 26, 2024

Description

This PR addresses an issue with the current implementation of OCI PURL repository URL resolution. According to the PURL specification, for the oci type, the 'name' should be the last fragment of the repository name, and it should not be unnecessarily appended to the repository URL.

Current behavior:

For a PURL like pkg:oci/debian@sha256%3A244fd47e07d10?repository_url=ghcr.io/debian&tag=bullseye
The implementation incorrectly resolves the repository URL to: ghcr.io/debian/debian:bullseye

Desired behavior:

The repository URL should resolve to: ghcr.io/debian:bullseye

Please correct me if I'm missing something. Thanks.

Signed-off-by: knqyf263 <knqyf263@gmail.com>
@knqyf263
Copy link
Contributor Author

I'm sorry I found a mistake and fixed it.

Copy link
Member

@puerco puerco left a comment

Choose a reason for hiding this comment

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

Nice catch, thank you!

@puerco puerco merged commit 7c54efc into openvex:main Aug 2, 2024
3 checks passed
@knqyf263 knqyf263 deleted the fix/oci_repository_url branch August 2, 2024 18:13
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.

2 participants