Prevent shell injection from Tekton task parameters
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- azure, shell, yaml
- Lĩnh vực
- infrastructure, security
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 26
- Fork
- 41
- Merge trung bình
- 3 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của redhat-developer/mapt
-
kind: v0.14.7 control-plane readiness block reads the wrong kubeconfig path (provision always fails)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
redhat-developer/mapt#997 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Host/username secret values contain trailing newlines, sanitization fix breaks SSH keyCó thể làm lại được @abdulazeem-tk4vr đã nhận 167 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
redhat-developer/mapt#817 · 12 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
openshift-snc: pick the latest published version when --version is not set (AWS and IBM Cloud)Đang mởenhancement provider/AWS provider/IBMCLOUD target/openshift-snc
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
redhat-developer/mapt#990 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
redhat-developer/mapt#974 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
openshift-snc: align cluster ingress domain with the nip.io access domain (crc.testing split-brain)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
redhat-developer/mapt#968 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của redhat-developer/mapt
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stefanpejcic/OpenPanel#1415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
status:needs-review type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Gentleman-Programming/engram#2512 ·
Maintainer thường phản hồi trong vòng 1 ngày