Skip to content

fix: ts-trueskillとscrape-itをセキュリティアップデート#1212

Open
hakatashi wants to merge 3 commits into
masterfrom
fix/security-update-ts-trueskill-scrape-it
Open

fix: ts-trueskillとscrape-itをセキュリティアップデート#1212
hakatashi wants to merge 3 commits into
masterfrom
fix/security-update-ts-trueskill-scrape-it

Conversation

@hakatashi

@hakatashi hakatashi commented Jun 20, 2026

Copy link
Copy Markdown
Member

概要

Issue #1211 で整理された未対応アップデートのうち、影響範囲が小さい2パッケージを対応。

  • ts-trueskill v4 → v5: moderate脆弱性対応。API互換性あり、dynamic importのため変更なし
  • scrape-it v5 → v6: high/moderate脆弱性対応。cheerio、jsdom、css-select、cheerio-req等の間接依存を解決

変更内容

パッケージ更新

  • ts-trueskill: ^4.1.0^5.1.0
  • scrape-it: ^5.3.2^6.1.12

テスト修正

scrape-it v6 では cheerio-req が v2 に更新され、HTTPリクエストが tinyreq から axios へ変更されたため、影響するテストのモック実装を更新:

  • room-gacha/index.test.ts: tinyreq モック → axios モックへ変更
  • lyrics/index.test.ts: tinyreq モック → axios.mockImplementation へ変更

🤖 Generated with Claude Code

- ts-trueskill v4 → v5 (moderate脆弱性対応)
- scrape-it v5 → v6 (high/moderate脆弱性対応、cheerio/jsdom等の間接依存を解決)
- scrape-it v6ではcheerio-req v2がtinyreqではなくaxiosを使用するため、
  影響テスト(room-gacha, lyrics)のモック実装をaxiosベースに更新

Closes: #1211

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tsg-ut-gemini-assistant

Copy link
Copy Markdown
Contributor

えへ~

ありがとう!

レビューさせてもらうにゃ!

🔍️🔍️🔍️️

@tsg-ut-gemini-assistant

Copy link
Copy Markdown
Contributor

🤖 I'm sorry @hakatashi, but I was unable to process your request. Please see the logs for more details.

hakatashi and others added 2 commits June 20, 2026 18:44
any型の使用を避けるため、room-gacha/index.test.tsとlyrics/index.test.tsの
axiosモック操作をjest.mocked(axios)経由のmockResolvedValue/mockImplementationに変更。
lyricsではaxios.get分離を廃止し、scrape-itとiTunes APIの両呼び出しを
単一のmockImplementationで処理するよう整理。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- url引数に明示的なstring型を付与し(url as string)キャストを削除
- as unknown as AxiosResponseをas AxiosResponseに簡略化

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@hakatashi hakatashi marked this pull request as ready for review June 20, 2026 17:45
@hakatashi hakatashi requested a review from hideo54 as a code owner June 20, 2026 17:45
@tsg-ut-gemini-assistant

Copy link
Copy Markdown
Contributor

えへ~

ありがとう!

レビューさせてもらうにゃ!

🔍️🔍️🔍️️

@tsg-ut-gemini-assistant

Copy link
Copy Markdown
Contributor

🤖 I'm sorry @hakatashi, but I was unable to process your request. Please see the logs for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant