依存パッケージのインストールにクールダウンを設定する - #15
Merged
Merged
Conversation
公開直後に乗っ取られたバージョンを掴まないよう、公開から7日未満の バージョンは解決対象から外す。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
概要
pnpm-workspace.yamlにminimumReleaseAge: 10080(7日)を設定し、npm に公開されてから7日未満のバージョンをインストール対象から外す。npm のサプライチェーン攻撃では、乗っ取られたパッケージが公開されてから発見・削除されるまでの数時間〜数日が最も危険な期間になる。クールダウンを挟むことで、その時間帯に新しいバージョンを掴んでしまうリスクを下げる。
影響範囲
バージョンを新しく解決するとき(
pnpm add/pnpm update/ ロックファイルにないパッケージ)にのみ効く。既存の依存関係とロックファイルは変わらず、pnpm install --frozen-lockfileの挙動にも影響しないことを確認済み。緊急のセキュリティパッチなどで最新版が必要になった場合は
minimumReleaseAgeExcludeで個別に除外できる。補足
インストール時のスクリプト実行はすでに
pnpm.onlyBuiltDependencies(esbuild/lightningcssのみ許可)で絞られており、本PRはそれを時間差防御で補完するもの。🤖 Generated with Claude Code