security: migrate PyPI publish to Trusted Publishing (OIDC)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
調査の方向性
Start with .github/workflows/publish-pypi.yml and the Trusted Publishing guidance from PyPI and pypa/gh-action-pypi-publish. Check the workflow's permissions, publish environment, and existing PyPI and Test PyPI secrets. Done means publishing uses OIDC with reviewer approval and the long-lived token secrets can be removed after verification.
索引モデルが issue の本文から書いたものです。
説明
Summary
publish-pypi.yml currently authenticates to PyPI using a long-lived PYPI_API_TOKEN repo secret. This is a security risk: if the secret is ever leaked or the repo is compromised, the token can be used to publish arbitrary versions to PyPI indefinitely.
Recommended fix
Migrate to PyPI Trusted Publishing (OIDC), which is supported natively by pypa/gh-action-pypi-publish. With trusted publishing:
- No long-lived token is stored anywhere
- PyPI issues a short-lived token scoped to a specific GitHub repo + workflow + environment for each publish run
- Even if the workflow is triggered unexpectedly, the token expires immediately after use
Steps
-
On PyPI, add a Trusted Publisher for
tabcmd:- Owner:
tableau - Repository:
tabcmd - Workflow:
publish-pypi.yml - Environment:
pypi-production(create this environment on the repo with required reviewers)
- Owner:
-
Update
publish-pypi.yml:- Add
permissions: id-token: writeto the job - Remove
password: ${{ secrets.PYPI_API_TOKEN }}from the publish step - The action authenticates automatically via OIDC
- Add
-
Add a
pypi-productionGitHub environment with required reviewer approval as an extra gate. -
Delete the
PYPI_API_TOKENrepo secret once verified.
Same change can be applied to TEST_PYPI_API_TOKEN / Test PyPI.
References
- 主要言語
- Python
- スター
- 52
- フォーク
- 17
- 平均マージ
- 5日 20時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tableau/tabcmd のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
feat: publish missing --description flag from tabcmd Classic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
feat: creategroup missing --role flag from tabcmd Classic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
似ている issue
-
md/asciidoc/csv: an explicit `encoding="utf-8"` keeps a leading BOM, the auto-detect path drops itオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docling-project/docling#4846 ·
メンテナーはふだん 1 日以内に返信
-
area/sessions comp/dashboard comp/desktop comp/gateway comp/tui duplicate P2 sweeper:risk-session-state type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#138914 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bot-triaged module: activation checkpointing module: inductor oncall: pt2 triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Update PR Actions Detective E2E prerequisites and fix dashboard-format table typoオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/oblt-aw#2382 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信