Bug: release tooling should quote remote command arguments
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 61
- Fork
- 48
- Merge trung bình
- 1 giờ 22 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
run_release.py builds remote shell command strings for release publication.
Several values are interpolated directly into those command strings, including
release credential environment values, the release tag, and remote staging paths
derived from release-manager state.
Those values are normally trusted release-process inputs, but quoting them
consistently makes the generated commands safer and more predictable when a
value contains whitespace or shell metacharacters.
Reproducer
Using mocked Paramiko clients:
- Set the python.org API credential value to contain shell metacharacters, such
asuser:key; echo unexpected. - Make the fake Sigstore issuer return a token containing shell metacharacters,
such astoken; touch /tmp/unexpected. - Run the python.org upload step and capture the command sent to
exec_command(). - The captured command includes those values unquoted in
AUTH_INFO=...and
SIGSTORE_IDENTITY_TOKEN=...assignments.
Similar mocked tests can set the release-manager SSH username to a value with a
metacharacter and observe that derived staging paths are inserted into cleanup,
copy, unzip, move, group, and permission commands without quoting.
Expected behavior
Release-tool commands should quote environment values, release arguments, and
remote filesystem paths before sending command strings to the remote shell,
while preserving intentional glob expansion for staged artifact copies.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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.
Hướng nghiên cứu
Bắt đầu với run_release.py và kiểm tra việc xây dựng lệnh cho thao tác tải lên python.org và các đường dẫn SSH của release-manager. Sử dụng các máy khách Paramiko được mock để thu thập đầu ra của exec_command() với các ký tự siêu dữ liệu trong thông tin xác thực, token, tên người dùng và đường dẫn staging; được xem là hoàn tất khi các giá trị đó được trích dẫn an toàn, trong khi việc mở rộng glob có chủ đích cho các bản sao tạo tác phẩm đã được staging vẫn được giữ nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- release
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100