Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Set minimum permissions for workflows

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

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
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các workflow trong .github/workflows, bao gồm ci-java7.yaml quanh dòng 42, và so sánh các action của chúng với tài liệu về quyền của GitHub Actions được liên kết trong issue. Xác định các quyền tối thiểu mà mỗi workflow cần, sau đó xác minh rằng các workflow sử dụng actions/checkout vẫn giữ quyền truy cập đọc cần thiết và tất cả các tệp workflow đều tuân theo hạn chế dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type: feature request

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Is your feature request related to a problem? Please describe.
GitHub workflows are granted high permissions by default. Permissions that allow, for example, to delete your source code and publish releases. The permissions can be exploited by malicious actions run in the workflow or malicious PRs if run on pull_request_target. This is specially important when using 3P actions such as:
https://github.com/googleapis/google-http-java-client/blob/1acedf75368f11ab03e5f84dd2c58a8a8a662d41/.github/workflows/ci-java7.yaml#L42.

Describe the solution you'd like
Set restricted permissions to run GitHub workflows or declare minimum permissions in the workflows.
e.g. permissions: contents: read for workflows that only need to do actions/checkout.

Describe alternatives you've considered
None.

Additional context
My name is Gabriela and I work on behalf of Google and the OpenSSF suggesting supply-chain security changes.

Ngôn ngữ chính
Java
Star
1.4k
Fork
474
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

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 googleapis/google-http-java-client

Tất cả issue của googleapis/google-http-java-client

Issue tương tự

Thêm issue về Java

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.