GitHub CLI 2.102.0
修正 1 項
修復四處安全漏洞,防範非預期檔案寫入與驗證被繞過
下載、安裝技能或驗證產物時不再受惡意名稱所害,建議盡快升到 v2.102.0。gh release download、gh run download、gh repo read-file --output 與 gh attestation download 遇目的地含符號連結(指向其他位置的捷徑檔)時,以前可能寫入非預期的本機檔案。gh attestation verify 以前比對 --source-ref 不分大小寫,且 --signer-workflow 只比憑證身分開頭,僅大小寫不同的分支,或同儲存庫內路徑開頭相同的另一個工作流程,都可能通過驗證。互動式 gh skill search 傳路徑給 gh skill install 時缺少選項分隔符號,搜尋結果可能注入安裝選項並改寫檔案位置。⟦就像同一棟樓四扇門的鎖被一次補好。⟧
官方原文
## Security
Four security vulnerabilities have been identified, and fixed, in this release. Users are advised to update gh to version v2.102.0 as soon as possible.
gh release download, gh run download, gh repo read-file --output, and gh attestation download could write remote content to an unintended local file when the destination contained symbolic links.
See https://github.com/cli/cli/security/advisories/GHSA-39wj-f2f4-978v for more information.
gh attestation verify compared the --source-ref value case-insensitively, so an attestation built from a branch whose name differs only in case could satisfy a policy that named a different branch.
See https://github.com/cli/cli/security/advisories/GHSA-4mq3-hpgx-9cx8 for more information.
Interactive gh skill search passed repository paths from search results to gh skill install without an option separator, so a search result could inject installer options and change where skill files were written.
See https://github.com/cli/cli/security/advisories/GHSA-qcwj-mr2r-2cx7 for more information.
gh attestation verify matched the --signer-workflow value against only the start of the signing certificate's identity, so an attestation signed by a different workflow in the pinned repository could pass verification when its path began with the pinned value.
See https://github.com/cli/cli/security/advisories/GHSA-wjmr-j3rp-mh2g for more information.