Prevent shell injection from Tekton task parameters
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- azure, shell, yaml
- Área
- infrastructure, security
Línea de trabajo
Start with tkn/infra-azure-aks.yaml and its template at tkn/template/infra-azure-aks.yaml, then audit the other Tekton tasks and templates across supported platforms for unsafe parameter substitutions and command construction. Trace how values reach shell commands, especially where eval is used, and check the existing task generation and validation setup. Done means malicious and normal parameter values are covered by reproducible validation, create and destroy behavior is preserved, and generated tasks match their templates.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Tekton substitutes parameter values into task scripts before the shell parses them. In tkn/infra-azure-aks.yaml, parameters such as vmsize, system-pool-vmsize, and workers-desired are inserted directly into shell command text. A value containing shell syntax can execute commands during assignment or when eval runs. The provisioner exports Azure credentials before constructing the command, so injected commands can access those credentials and other resources available to the task.
Required changes
- Fix parameter handling in
tkn/infra-azure-aks.yamland its template,tkn/template/infra-azure-aks.yaml. - Audit other Tekton tasks and templates across supported platforms for the same unsafe substitution and command-construction patterns, and fix affected cases.
- Pass parameter values as data, not shell source. Prefer direct argument construction without
eval; ifevalremains, ensure untrusted values cannot be interpreted as shell syntax. Review parameter substitutions outside command construction as well. - Preserve existing task behavior and keep generated tasks and templates consistent.
Acceptance criteria
- Parameter values containing command substitution, quotes, spaces, or shell metacharacters cannot execute commands or alter the intended arguments.
- Normal create and destroy operations, flags, defaults, and comma-separated VM-size values continue to work.
- Tests or other reproducible validation cover malicious and normal parameter values for the affected patterns.
Requested by @adrianriobo as a follow-up to:
- Pull request: https://github.com/redhat-developer/mapt/pull/984
- Review comment: https://github.com/redhat-developer/mapt/pull/984#discussion_r4692347707
- Lenguaje dominante
- Go
- Estrellas
- 26
- Forks
- 41
- Merge medio
- 3 d 14 h
- PR fusionados (30 d)
- 27
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de redhat-developer/mapt
-
kind: v0.14.7 control-plane readiness block reads the wrong kubeconfig path (provision always fails)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
redhat-developer/mapt#997 ·
Los mantenedores suelen responder en 3 días
-
Host/username secret values contain trailing newlines, sanitization fix breaks SSH keyQuizá libre de nuevo @abdulazeem-tk4vr la tomó hace 167 días y no hay ningún pull request abierto. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
redhat-developer/mapt#817 · 12 comentarios ·
Los mantenedores suelen responder en 3 días
-
openshift-snc: pick the latest published version when --version is not set (AWS and IBM Cloud)Abiertoenhancement provider/AWS provider/IBMCLOUD target/openshift-snc
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
redhat-developer/mapt#990 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
redhat-developer/mapt#974 ·
Los mantenedores suelen responder en 3 días
-
openshift-snc: align cluster ingress domain with the nip.io access domain (crc.testing split-brain)Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
redhat-developer/mapt#968 · 1 reacción ·
Los mantenedores suelen responder en 3 días
Todos los issues de redhat-developer/mapt
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
stefanpejcic/OpenPanel#1415 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
status:needs-review type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Gentleman-Programming/engram#2512 ·
Los mantenedores suelen responder en 1 día