Skip to content

sprintf-js を依存ツリーから除去 (GHSA-hp3w-g68c-fv3c 対応) - #54

Merged
shishi merged 1 commit into
masterfrom
fix/remove-sprintf-js
Nov 3, 2026
Merged

shishi merged 1 commit into
masterfrom
fix/remove-sprintf-js

Conversation

@shishi

@shishi shishi commented Nov 3, 2026

Copy link
Copy Markdown
Member

Dependabot アラート対応です。

sprintf-js の脆弱性(GHSA-hp3w-g68c-fv3c、対象 <=1.1.3)には修正版リリースが存在しないため、sprintf-js 自体のアップグレードでは直せません。依存ツリーから外す方法を取りました。

経路: @istanbuljs/load-nyc-config → js-yaml 3系 → argparse 1系 → sprintf-js 1.0.3

対応: package.json に npm overrides を追加し、@istanbuljs/load-nyc-config 配下の js-yaml のみ ^4 に差し替えました。これにより argparse 1系と sprintf-js がツリーから消えます。

検証:

  • npm ls sprintf-js : empty
  • npm test(pretest の lint / format check を含む)と npm run test:mjs : 全て通過

sprintf-js <=1.1.3 (GHSA-hp3w-g68c-fv3c) has no patched release, so
upgrade of sprintf-js itself is impossible. It was pulled in via
@istanbuljs/load-nyc-config -> js-yaml 3 -> argparse 1 -> sprintf-js.
Pin js-yaml to ^4 for @istanbuljs/load-nyc-config through npm
overrides, which drops argparse 1 and sprintf-js from the tree.
Verified: npm ls sprintf-js is empty; jest suites (js and mjs) pass,
including pretest lint/format checks.
@shishi
shishi merged commit c348acc into master Nov 3, 2026
2 checks passed
@shishi
shishi deleted the fix/remove-sprintf-js branch November 3, 2026 07:21
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