fix(security): fast-uri / brace-expansion の High アドバイザリを override 更新で解消 - #176
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
pnpm auditで新たに検出された High 2件 (fast-uri/brace-expansion) をpnpm-workspace.yamlの overrides 更新で解消しました。本リポジトリは記事の Markdown 置き場であり、いずれも textlint / Prisma 系 CLI の推移的依存で、実行時に外部入力が到達する経路はありません。1. 脆弱性の概要
fast-uri
\\evil.com/pathのようにバックスラッシュをオーソリティ導入部に使った URI をfast-uriはパスとして扱う一方、Node の WHATWGURL/fetch()は\を/と等価に扱うため、検証と実際の接続先がずれる。brace-expansion
expand()の中間配列に上限がなく、CVE-2026-14257 に対する 5.0.8 の緩和策を迂回できる。2. このコードベースでの具体的な攻撃シナリオ
fast-uri
textlint > @textlint/linter-formatter > table > ajv > fast-uritextlintはmake lint(CI の.github/workflows/lint.yml) からarticles配下の Markdown を検査するために起動される CLI。fast-uriを使うのはajvがフォーマッタ設定用 JSON Schema の$ref/$idを解決する部分で、渡るのはライブラリ同梱のスキーマ内の静的な URI のみ。リポジトリ内に URL の許可判定やfetch()を行うアプリケーションコードは存在しない (このリポジトリは記事 Markdown と textlint 設定のみ)。fast-uriでパース・検証してから同じ文字列を Node のURL/fetch()に渡す実装が必要。本リポジトリにはその経路が無く、成立しない。brace-expansion
textlint > glob > minimatch > brace-expansiontextlintがファイル探索を行う際の glob パターン展開。渡るのはMakefileのarticlesおよびtextlintignoreに書かれた静的なパターンのみで、外部入力は無い。expand()に巨大なブレースパターンを渡すことで OOM/CPU 占有を起こせるが、そのパターンはMakefile/textlintignoreを書き換えられる者しか注入できず、その権限があれば CI で任意コマンドを実行できる。3. 修正内容
pnpm-workspace.yamlのoverridesを更新 (バージョン強制のみ、直接依存の変更なし)。fast-uri@<3.1.4: >=3.1.4→fast-uri@<4.1.2: >=4.1.2brace-expansion@>=5.0.0 <=5.0.7: >=5.0.8→brace-expansion@>=4.0.0 <5.0.9: >=5.0.9pnpm-lock.yamlをpnpm install --lockfile-onlyで更新 (fast-uri4.1.1→4.1.2、brace-expansion5.0.8→5.0.9)。4. 修正後の確認
pnpm audit→No known vulnerabilities foundmake install/make lint(textlint) 成功。Link to Devin session: https://app.devin.ai/sessions/0d8c1a634ced40ea94d8ce4cc65de922