fix(deps): 2026-07-27 audit 波の high 脆弱性を解消する - #30
Merged
Conversation
brace-expansion / js-yaml / postcss / fast-uri で新しい advisory が 公開され、いずれも既存 override をすり抜けて high 検出されていた。 すり抜けの原因は 2 つある。 1. セレクタの上限が固定値だった brace-expansion の既存 override は `>=3 <5.0.7` を `>=5.0.7` へ 寄せる形で、5.0.7 自身が脆弱化した今回はセレクタにマッチしない。 上限を 5.0.8 へ引き上げた。 2. override セレクタは解決後の版ではなく親が宣言するレンジにマッチする js-yaml は eslint 系が `^4` で宣言し、既存 override `js-yaml@4: ">=4.3.0"` が上限なしのため実際には 5 系が入っていた。 `js-yaml@5` のセレクタを足しても宣言レンジと交差せず発火しないため、 既存 override の下限を 5.2.2 へ引き上げる形で修正した。 また brace-expansion は 5.0.7 以下が全て脆弱になり 1 系 / 2 系に安全版が 無くなった。これらを要求するのは minimatch の旧メジャーなので、minimatch を brace-expansion 5 系を使う 10 系へ引き上げて解消している。 brace-expansion 5.0.8 と js-yaml 5.2.2 は 2026-07-23 公開で minimumReleaseAge (7日) を満たさないため exclude に追加した。 2026-07-31 以降に削除すること。 Co-Authored-By: Claude Opus 5 (1M context) <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.
Summary
2026-07-27 に公開された advisory 波で
pnpm auditが high を検出し CI が赤くなっていたのを解消するのだ。既存の override をすり抜けていたのがポイントで、単純にバージョンを足すだけでは直らなかったのだ。すり抜けの原因(2 つあるのだ)
1. セレクタの上限が固定値だった
既存 override は
'brace-expansion@>=3 <5.0.7': '>=5.0.7'の形で、5.0.7 に固定するものだったのだ。今回 5.0.7 自身が脆弱化(<=5.0.7が対象)したので、5.0.7 に居座っているパッケージはセレクタにマッチせず素通りしたのだ。上限を<5.0.8/>=5.0.8へ引き上げたのだ。2. override セレクタは「解決後の版」ではなく「親が宣言するレンジ」にマッチする
js-yaml は eslint 系が
^4で宣言していて、既存の'js-yaml@4': '>=4.3.0'が上限なしのため実際には 5 系(5.2.1)が入っていたのだ。ここに'js-yaml@5': '>=5.2.2'を足しても宣言レンジ^4と交差しないので永久に発火しないのだ。既存 override の下限を>=5.2.2に引き上げる形で修正したのだ。brace-expansion 1 系 / 2 系の扱い
新 advisory は
<=5.0.7が対象で、1 系・2 系には安全版が存在しないのだ。これらを要求しているのはminimatchの旧メジャーなので、minimatch を brace-expansion 5 系を使う 10 系へ引き上げて解消したのだ。Changes
brace-expansion@>=3 <5.0.7→>=3 <5.0.8/>=5.0.8(セレクタごと引き上げ)brace-expansion@1/@2→>=5.0.8、あわせてminimatch@<10.0.0: '>=10.2.4'js-yaml@4の下限を>=5.2.2へpostcss@<8.5.18: '>=8.5.18'/fast-uri@>=3.0.0 <3.1.4: '>=3.1.4'を追加minimumReleaseAgeExcludeにbrace-expansion/js-yamlを追加(2026-07-31 以降に削除)(repo により元々の override 構成が異なるため、実際の差分は上記の一部になるのだ)
Test plan
pnpm auditで high / critical 0 件Co-Authored-By: Claude noreply@anthropic.com