Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ 初心者向け
#5,091 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@cliffhall がすでに取り組んでいます。

2026年10月13日 から。

  • #5141 @cliffhall による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
80/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, yaml
領域
ci-cd, security

調査の方向性

まず .github/workflows/python.yml と .github/workflows/typescript.yml から始めてください。現在、この2つにはトップレベルにもジョブごとにも permissions ブロックがありません。トップレベルに contents: read を指定した permissions ブロックを追加し、そのあと残りのワークフローファイルに同じ不足がないか確認してください。両ファイルがスコープを宣言し、そのどのジョブもそれ以上の権限を必要とせず、ワークフローが引き続き解析され実行されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
91.2k
フォーク
11.8k
平均マージ
6時間 39分
マージ済み PR(30日)
111

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/servers のほかの issue

modelcontextprotocol/servers の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。