Skip to content

security: 実行時の依存を更新(monaco-editor・immutable・query-string) #1318

Closed

Description

@smalruby3-editor-bot

スコープ

実行時に効く npm advisory を直す。

  • monaco-editor 0.55 → 0.57(同梱の dompurify の XSS。Ruby エディタで実行時に効く)
  • immutable 3.8.3 → 3.8.4(scratch-gui / scratch-vm で実行時に使う)
  • query-string 5.1.1(修正版なし): overrides で decode-uri-component を修正版にできるか確かめる。だめなら代替を検討し、結論をコメントに残す。

確認

  • Ruby タブ(Monaco)の動作を pw-check で確かめる(入力・ハイライト・ふりがな表示など)。
  • 関係する unit テストと lint。

方針

upstream(Scratch)由来の依存は、upstream 追従のコストを増やさないよう、まず overrides や最小の更新で直せないかを試す。upstream ファイルを書き換えるときはマーカーを付ける。

Part of #1264

Activity

  1. moved this to Sprint Backlog in Autopiloton Nov 3, 2026
  2. moved this from Sprint Backlog to In Progress in Autopiloton Nov 3, 2026
  3. smalruby3-editor-bot commented on Nov 3, 2026

    @smalruby3-editor-bot
    Author

    query-string(修正版なし)の結論

    overrides では直せない。この Issue(PR #1326)では据え置く。

    • decode-uri-component の修正版 0.5.1 は ESM 専用("type": "module")。query-string 5.1.1 は require('decode-uri-component') を関数として呼ぶので、override すると TypeError: decodeComponent is not a function になる(Node 24 で確認)。
    • 影響範囲: scratch-gui での使い道は location.search の解析と保存時の stringify だけ。細工した URL を開かせるとそのタブが重くなる、というクライアント側の DoS にとどまる。
    • 代替案: URLSearchParams へ置き換えれば消せるが、upstream ファイル 5 つ(blocks.jsx / query-parser-hoc.jsx / detect-locale.js / save-project-to-server.js / reducers/block-display.js)を書き換えることになり、upstream 追従コストが増える。リスクの小ささと比べて割に合わないと判断した。置き換えるなら別 Issue で。

    (skyway-js が内部で使う query-string 6.14.1 もこの対象外。skyway-js 自体の扱いは #1264 の別項目。)

  4. moved this from In Progress to Review in Autopiloton Nov 3, 2026
  5. moved this from Review to In Progress in Autopiloton Nov 3, 2026
  6. moved this from In Progress to Review in Autopiloton Nov 3, 2026
  7. added a commit that references this issue on Nov 3, 2026
  8. moved this from Review to Close in Autopiloton Nov 3, 2026
  9. added a commit that references this issue on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🤖 autopilotautopilot が処理対象にした Issue/PR(daemon が付与)

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions