8000 NVSHAS-9940: NV scan JFrog Subdomain mode issue by williamlin-suse · Pull Request #2021 · neuvector/neuvector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

NVSHAS-9940: NV scan JFrog Subdomain mode issue #2021

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

williamlin-suse
Copy link
Contributor

No description provided.

Copy link
Contributor
@pohanhuangtw pohanhuangtw left a comment

Choose a reason for hiding this comment

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

LGTM overall — I just have one small question.
Thanks—let me know what you think! 🙏

key, repository, found := strings.Cut(repositoryStr, "/")
if !found {
return tags, fmt.Errorf("invalid repository format: %v", repositoryStr)
key := r.subdomainInRegURL
Copy link
Contributor

Choose a reason for hiding this comment

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

If JFrog is not using the sub-domain style right now, will this branch still work?
In that case the key will be empty.

Suggestion: We could branch the logic explicitly by mode:

if r.mode == share.JFrogModeSubdomain {
    // handle sub-domain scenario
} else {
    // existing path for path-style or default mode
}

This makes the intent clear and prevents nil/empty-key issues when the registry is in the “path-style” mode.

what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. changed code as advised

Copy link
Contributor
@pohanhuangtw pohanhuangtw left a comment

Choose a reason for hiding this comment

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

LGTM

@williamlin-suse williamlin-suse merged commit 38b5438 into neuvector:main Jun 26, 2025
5 checks passed
@williamlin-suse williamlin-suse deleted the NVSHAS-9940 branch June 26, 2025 02:57
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
0