Avoiding `pull_request_target` usage in workflows

未關閉
#3,864 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
55/100
Issue 類型
重構
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
github-actions
領域
ci-cd, security

研究方向

從第 4 行的 .github/workflows/pr-comment.yml 開始,閱讀 GitHub 關於安全使用 pull_request_target 的指南,以及連結的 checkout 變更。依照提議分離建置和發布職責,然後確認沒有 workflow 使用 pull_request_target,並確認兩個必要的 action 仍能安全運作。

由索引模型根據 Issue 內容生成。

描述

bug github_actions

One of this repositories workflow's uses pull_request_target:

https://github.com/python/python-docs-es/blob/9b99734eefaa1b21480066abc9a336dad45b95cd/.github/workflows/pr-comment.yml#L4

Please see the GitHub documentation for a list of risks associated with the target. I see the workflow is currently quite careful, but IMO it is still better to split it into two, one for building and one for posting.

It is now disallowed by actions/checkout (see blog post). We are also considering disabling it across the organisation (new feature), but it would break this workflow.

主要語言
Python
星號
371
分支
413
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

python/python-docs-es 的其他 Issue

查看 python/python-docs-es 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。