lincc-frameworks / lincc-frameworks/python-project-template
Change third party github actions to target specific commits rather than tags
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Jinja
- Star
- 85
- Fork
- 16
- Merge trung bình
- 6 giờ 18 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
We should pin our third party github actions to a specific commit, rather than a tag as we currently do.
This is a cybersecurity measure recommended by GitHub:
The individual jobs in a workflow can interact with (and compromise) other jobs. For example, a job querying the environment variables used by a later job, writing files to a shared directory that a later job processes, or even more directly by interacting with the Docker socket and inspecting other running containers and executing commands in them.
This means that a compromise of a single action within a workflow can be very significant, as that compromised action would have access to all secrets configured on your repository, and may be able to use the GITHUB_TOKEN to write to the repository. Consequently, there is significant risk in sourcing actions from third-party repositories on GitHub. For information on some of the steps an attacker could take, see Secure use reference.
In our workflows, we have some third party actions used like such:
- name: Install uv
uses: astral-sh/setup-uv@v7
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 bằng cách tìm kiếm trong các tệp workflow của repository các GitHub Actions bên thứ ba, bao gồm ví dụ astral-sh/setup-uv@v7. Pin mỗi action bên thứ ba vào một commit cụ thể thay vì một tag, sau đó chạy các bước kiểm tra workflow hiện có để xác nhận rằng chúng vẫn vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github-actions
- Lĩnh vực
- ci-cd, security
- Loại issue
- Tái cấu trúc
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 65/100