fix: npm 脆弱性 alert へ対応する - #13
Merged
Merged
Conversation
kotlin-js-store/yarn.lock の npm 依存はすべて mocha(JS/wasm テストランナー)の推移依存で、 brace-expansion は minimatch / glob 経由で 2.1.2 に固定されていた。修正版 2.1.3 は上流の 宣言レンジ ^2.0.2 の内側にあり、lockfile の再解決だけで到達できる。 ルートビルドと integration-test の双方で kotlinUpgradeYarnLock を実行し、brace-expansion を 2.1.4 へ上げる。js-yaml 4.3.1 は同じ再解決に伴う随伴で脆弱性とは無関係。生成物は .gitattributes の方針に合わせて LF へ正規化する。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
npm は version updates の対象に含めない。lockfile は KGP が JS/wasm テストランナー用に生成する 成果物であり、宣言元の package.json がリポジトリに存在しないため、Dependabot の更新 PR は次の kotlinUpgradeYarnLock で失われる。 alerts の判定基準として、上流の宣言レンジ内に修正版がある場合は lockfile の再生成で追随し、 無い場合は tolerable_risk として dismiss することをコメントへ置く。resolutions による major 跨ぎの 強制上書きは、上流が検証していない組み合わせをテストランナーへ注入することになるため採らない。 Co-Authored-By: Claude Opus 5 <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.
背景
Dependabot の npm alert 8 件(
kotlin-js-store/yarn.lock4 件・integration-test/kotlin-js-store/yarn.lock4 件)はすべてmocha@11.7.5の推移依存によるもの。lockfile のルートは mocha / source-map-support / kotlin-web-helpers の 3 つのみで、mocha は JS/wasm のテストランナーとしてのみ使われる。配布物には入らない(
runtime-apiの生成package.jsonは依存ゼロ、公開先は Maven Central のみで npm 公開は無い)。処理する入力も CI 内の自リポジトリのテスト成果物に限られる。^2.0.2(minimatch / glob 経由)^6.0.2^7.0.0mocha は最新の 11.7.6 でも
diff@^7.0.0/serialize-javascript@^6.0.2のままで、上流に修正版が無い。変更
1. lockfile の再生成(
fix:)両ビルドで
kotlinUpgradeYarnLockを実行し、宣言レンジ内で修正版へ到達する brace-expansion を 2.1.4 へ上げる。差分は 2 ファイル各 6 行。2. 判定基準の明文化(
ci:).github/dependabot.ymlへ、npm を version updates 対象に含めない理由(lockfile が KGP の生成物で、更新 PR が次のkotlinUpgradeYarnLockで失われる)と、alert の 2 段判定を置く。レンジ内に修正版が無い serialize-javascript / diff は
resolutionsによる major 跨ぎの強制上書きでしか直せず、上流が検証していない組み合わせをテストランナーへ注入することになるため採らない。該当 6 件はtolerable_riskとして dismiss 済み。確認
jsNodeTest/wasmJsNodeTest/wasmWasiNodeTestを--rerunで実行し、mpp-producer・mpp-consumer とも failures 0 / errors 0。kotlinStoreYarnLock(lockfile 一致検査)も通過する。マージ後
brace-expansion の 2 件(#4 / #8)は再スキャンで自動クローズされる想定。
settings.gradle.kts側の 8 件(jackson / opentelemetry)は Gradle プラグインクラスパス由来で、本 PR のスコープ外。🤖 Generated with Claude Code