-
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
Cosigned policies interpreted as regex by default #1871
Comments
CC @vaikas |
@znewman01 i am working on using globing and remove regex from the image pattern. There is already an issue |
I see #1834...I'm not convinced that this is a dupe, it seems to be a different regex unless I'm misunderstanding something. Would that change make it so that an escaping step happens before we compile it as a regex in |
@znewman01 You are right! It is related to https://github.com/sigstore/cosign/blob/main/pkg/apis/cosigned/v1alpha1/clusterimagepolicy_validation.go#L200. For a moment, i believed it was related to #1834. |
@znewman01 @vaikas Should the subject be a non-regexp instead ? Or you can see use cases here. If so, i am wondering if we should do the same for issuer. |
My main concern is that users will accidentally enter something like an email (including I'm okay with users being able to specify a regex, and it seems useful. Maybe if it's opt-in? Or really obvious (users have to type |
Ok. How do folks feel if for v1beta1, we add something like a prefix, r: that indicates it's an regex? It's a bit goofy I suppose, but thoughts? |
I have one escaping concern long-term: But yeah something like that would be fine for v1beta1 :) |
Yeah, let's solve it for v1beta1. |
Just bringing this back. So, I think we have couple of options (I'm sure I missed some), but I think I'd rather tackle this hopefully in a more 'final' form sooner rather than later.
As I said I'm sure there are others, but I think I kind of like the last option for clarity and therefore no confusion on it. And of course, the last option is that we do not allow any regexp at all, but I think it's useful. Maybe I'm wrong :) |
I agree it would be useful! |
I definitely agree it is useful, I am just concerned about the prefix |
Originally posted by @znewman01 in #1869 (comment)
I don't think this is necessarily a problem except users shouldn't be surprised by it or do the wrong thing by default. So maybe: make it loudly warn, or make regex behavior configurable? Or support globs instead?
The text was updated successfully, but these errors were encountered: