配布手順を最新Releaseと固定依存の検証へ更新 - #164
Merged
Merged
Conversation
added 3 commits
August 8, 2026 23:16
Decision-Ref: gtp/decisions/distribution.md Decision-Ref: gtp/decisions/skill-installation-scope.md
…e-2.0.9 # Conflicts: # README.md
CLI本体だけでなくruntime依存もexact version・SHA-512で検証し、検証済みtarballだけをofflineで実行する。Node.js 22.20.0以上を明示し、source archive・Skill構造・package hashの検証をfail-closedにする。 Decision-Ref: gtp/decisions/distribution.md Decision-Ref: gtp/decisions/skill-installation-scope.md
releases/latestはtag解決にだけ使い、解決したtagのarchiveとSHA256SUMSをペアで検証する。固定CLIとruntime依存のoffline実行は維持する。 Decision-Ref: gtp/decisions/distribution.md Decision-Ref: gtp/decisions/skill-installation-scope.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
前回のCodex Security scanで確認した、mutableなinstallerと未検証archiveをuser-level Skill scopeへ取り込む導入経路を閉じる。現行repositoryに実行コードの脆弱性はないが、供給物が改変された場合にAgent scopeへ永続的なSkill injectionを許す余地があった。このPRはcomponent repositoryのdirect installを残したまま、最新の安定版GTP 2.x Releaseを自動追従しつつ、導入手順の検証をfail-closedにする。collection側は変更しない。
変更内容
releases/latestを一度だけ解決してtagを固定し、そのtagのRelease archiveとSHA256SUMSを検証する方式へ変更。v2.0.9のURL・archive名・hashを手順に埋め込まない。22.20.0以上のguard、set -eu、archive内の二つのSKILL.md確認、v2.x以外を拒否するtag検証を追加。skillsv1.5.21本体とruntime依存7個(tar@7.5.22、yaml@2.9.0、@isaacs/fs-minipass@4.0.1、chownr@3.0.0、minipass@7.1.3、minizlib@3.1.0、yallist@5.0.0)をexact version・SHA-512で検証する手順を維持。npm exec --offlineへ渡す。未検証zip、tag名だけのarchive、検証失敗後の継続実行は使わない。根本原因
READMEは「GTP 2.xのReleaseを選ぶ」と説明していたのに、直下のURL・archive名・source hashがすべてv2.0.9固定だった。別Releaseを選ぶと、選択内容と実際に検証・導入するarchiveが食い違う。さらに従来の手順は、一時directoryで
npm exec --package="./..."を実行しており、npmが解決するprefixとtarballの相対pathがずれていた。grep、hash検証、npm packの失敗を停止させる明示的なfail-closed制御もなく、CLI本体だけを固定してruntime依存の取得経路を残していた。利用者への影響
component direct installは、最新の安定版GTP 2.x Releaseを自動で選び、そのtagのarchiveと
SHA256SUMSを検証する。Node.js22.20.0以上とnpmが必要である。検証後のCLI起動は--offlineで行い、skills addのAgent選択と二つのSkillのuser-level copyは従来どおりである。collection releaseとcomponent repositoryのdirect installを同時に残す方針はこのPRでは変更しない。releases/latestの解決と同じReleaseのSHA256SUMSを信頼する設計であり、Release権限そのものが侵害された場合まで防ぐ署名検証は含めていない。latest tagがGTP v2.x形式でなければ、手順は停止する。検証
git diff --checksed -n '82,144p' README.md | sh -nreleases/latestのredirect:v2.0.9へ解決、archive名を同tagから生成OKOKskills_add --agent codex --list:Found 2 skills(copyなし)1リリース
このPRのmerge後は、READMEをReleaseごとに書き換えず、次の最新安定版GTP 2.xが標準手順から自動追従される。collection側の更新は、このcomponent repositoryのRelease更新後に行う。