Enforce Step.image
is under control of Task Author
#7085
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
Feature request
Tekton Controller should have some enforcement to make sure that some critical fields in a TaskSpec are fully under control of the task author even though the fields accept parameter injection.
Step.Image
is the critical field that determines what will be run in a K8s pod.Phase 1: If a parameter variable is used in
Step.Image
field, Tekton Controller checks whether there is an allowed list specified for that parameter.Note:
Allow Task Authors specify a Param Allowed List #7084 proposes to add
allowed
field in ParamSpec to let Task Author declare the allowlist upfront.If the allowlist for the param used in the suffix part of
Step.Image
contains the mutable tag reference, phase 1 can still recognize it's controlled by the author.Phase 2: Tekton controller checks whether Task Author has the full control in
Step.Image
. That meansUse case
As mentioned above,
Step.Image
field is so critical that it determines what will be run in a K8s pod. Tekton needs to have this enforcement to make sure that our security feature i.e. trusted task is really secure. Otherwise, there will be a case that a signed task can be successfully verified by our "trusted resources" feature, but param injection is not controlled, which is a security hole, and compromises our security story in Tekton.It's worth noting that there are many OSS Policy-as-Code solutions (i.e. https://kyverno.io/) that allows cluster operators to create policies against the resources in their cluster. And it offers great flexibility in terms of resource filtering and policy rules definition. But the difference between this requested feature and kyverno is that
The text was updated successfully, but these errors were encountered: