-
Notifications
You must be signed in to change notification settings - Fork 547
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
Want to use GlobMatch on root level domain (e.g. "ghcr.io/*") #1903
Comments
Related question: is |
Using the glob match rules, I believe it would match a dockerhub official image like I'd like to suggest that image refs like The webhook could return a warning if the match is specified like There's also |
Another issue: The glob pattern Unless we want users to maintain a large list of valid globs like:
I think it would be useful to support regexps, and maybe just warn or error on potentially confusing regexps like |
Re #1903 (comment) -- based on some tests with @tcnghia it sounds like we're already canonicalizing All that's left then is to warn when a policy includes |
@imjasonh @jdolitsky I was looking to the Globing function, and generally I started to consider re-using this function from the Kubernetes core https://github.com/kubernetes/kubernetes/blob/9720d130e466f401d00e93a3c537848cbf76ca26/pkg/credentialprovider/keyring.go#L184 instead of the current function that we have. Do you have any thoughts about it ? |
That method doesn't seem to support There's also this comment:
I think that's something we'd need, for example, to support But in any case, without I think we should change
Then absolutely go nuts with tests for every possible conceivable case. Tests are effectively our documentation. If this plan sounds okay to folks I can send a PR. rough first pass: https://gist.github.com/imjasonh/1e2bd9cbe67ca9522bbdd0c7a2842d52 |
Yeah, let's get that in https://gist.github.com/imjasonh/1e2bd9cbe67ca9522bbdd0c7a2842d52. |
The GlobMatch method does not accept a pattern such as
ghcr.io/*
Seems there is a bug on Go opened in 2015: golang/go#11862
cc @tcnghia
The text was updated successfully, but these errors were encountered: