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

CI: declare explicit GITHUB_TOKEN permissions in python.yml and typescript.yml

Đang mở Phù hợp với người mới
#5,091 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
80/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ệ
github-actions, yaml
Lĩnh vực
ci-cd, security

Hướng nghiên cứu

Bắt đầu với .github/workflows/python.yml và .github/workflows/typescript.yml, hiện cả hai không có khối permissions ở cấp cao nhất cũng như ở cấp từng job. Thêm khối permissions cấp cao nhất với contents: read, rồi kiểm tra các tệp workflow còn lại xem có cùng thiếu sót hay không. Hoàn thành khi cả hai tệp khai báo phạm vi, không job nào trong đó cần thêm quyền, và các workflow vẫn được phân tích cú pháp và chạy được.

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

Mô tả

chore v2

Problem

CodeQL's actions/missing-workflow-permissions rule flags every job in .github/workflows/python.yml and .github/workflows/typescript.yml: neither workflow declares a permissions block, at the top level or per job, so each job's GITHUB_TOKEN takes the repository default.

  • Open alerts on main: #5, #6, #7, #8, #22, #23 (since 2025). The v1.0.0 merge PR #5090 surfaced the same rule on the jobs added since (Windows legs, coverage): code-scanning alerts 24–35.
  • The gap exists on main, v2/main and v2/release/1.0.0 alike.

Impact

Defense in depth, not an exposure today: the repository's default workflow permission is read (GET /repos/modelcontextprotocol/servers/actions/permissions/workflow → "default_workflow_permissions":"read"). If that setting were ever changed to read/write, every job in these two workflows would silently gain write access.

Expected

Each workflow declares permissions: contents: read at the top level (no job here needs more), so the token's scope is fixed in the file rather than inherited from a setting. Check the other workflows for the same gap while there. The alerts close when the change reaches main at the next milestone merge.

Ngôn ngữ chính
JavaScript
Star
91.2k
Fork
11.8k
Merge trung bình
6 giờ 52 phút
Pull request đã merge (30 ngày)
107

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 modelcontextprotocol/servers

Tất cả issue của modelcontextprotocol/servers

Issue tương tự

Thêm issue về JavaScript

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.