Avoid eval for externally supplied Tekton task parameters

Đang mở
#874 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@ppitonak đang làm issue này rồi.

Từ ngày 30/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Summary

Several AWS Tekton tasks construct a mapt command as a shell string and invoke it with eval. Parameters supplied to the Task can therefore be reinterpreted by the shell during evaluation rather than treated strictly as command arguments.

Required changes

Refactor the command construction in the affected AWS Tekton tasks to avoid eval and pass arguments directly using a safely quoted mechanism appropriate for the script shell (for example, a Bash argument array where Bash is available).

Affected areas:

  • tkn/template/infra-aws-ocp-snc.yaml
  • tkn/infra-aws-ocp-snc.yaml
  • tkn/template/infra-aws-rhel.yaml
  • tkn/infra-aws-rhel.yaml

Keep template and generated/deployed manifests consistent.

Rationale

Task parameters are externally supplied input. Evaluating an interpolated command string can allow shell syntax in parameter values (such as command substitutions, backticks, or quote characters) to alter command execution.

Acceptance criteria

  • No affected task invokes a command assembled from Task parameters via eval.
  • Task parameter values are passed as literal CLI arguments.
  • The OCP SNC and RHEL template and deployed manifests remain behaviorally aligned.
  • Existing supported create and destroy command options continue to be forwarded correctly.

Backlinks

Ngôn ngữ chính
Go
Star
25
Fork
41
Merge trung bình
5 ngày 3 giờ
Pull request đã merge (30 ngày)
16

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của redhat-developer/mapt

Tất cả issue của redhat-developer/mapt

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.