-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Missing validation against parameter name format #4792
Comments
Thoughts
|
@chuangw6 thank you for this report, it sounds like validation there can use some improvement and unit tests :) |
Hi @afrittoli , |
Hi @afrittoli @dibyom , Do you have any thoughts on this? Fee free to follow up here or in #4797. |
/assign |
Result name and Param nameThe interpretation of this regex seems that result name format shares same rules with param name except that a rule (not mentioned for param names) which is result name should only end with alphanumeric chars and not end with We should make sure result name and param name follow same rules and enforce that in param names as well (currently, the enforcement for param name format is missing). |
Expected Behavior
This doc mentioned that the parameter names should follow the following rules:
Therefore, there should be existing validation against parameter names that users specified. For example, the following parameter names are invalid, which should be caught and reported by the admission webhook when the taskrun yaml is applied.
Actual Behavior
taskResults
outputecho-output
is populated with valuesbar1 bar2 bar3
, which should not happen because the parameter names are all invalid i.e.0foo
starts with 0,a b
has a space in the middle,$x
starts with $bad-echo
is shown in thetaskResults
list under status, but has some confusing value+2
. (See the reason why this happens here)Steps to Reproduce the Problem
kubectl get tr <TASKRUN_NAME> -o yaml
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
Also found that a param without a name also works, which is weird
The text was updated successfully, but these errors were encountered: