chore: pnpmへ移行しセキュリティ設定を追加#1
Open
april418 wants to merge 11 commits into
Open
Conversation
4 tasks
パッケージマネージャーをpnpm 10.33.0に統一し、 セキュリティ関連の設定を追加した。 主な変更: - .npmrc / pnpm-workspace.yaml でセキュリティポリシーを設定 - 全依存関係を最新バージョンに更新 (pnpm update --latest) - バージョンを完全固定 (save-exact) - ESLint flat config (eslint.config.mjs) へ移行 (gts 7.0)
lodash 4.18.0で修正済みだが、公開から7日未満のため minimumReleaseAgeによりインストールできない。 7日経過後にignoreCvesを削除しoverridesで修正すること。
- minimumReleaseAgeExcludeでlodash/lodash-esをmin-release-ageから除外 - overridesでlodash<=4.17.23を>=4.18.1に強制更新 - GHSA-r5fr-rjxr-66jc (Code Injection) の修正バージョンに更新 - ignoreCvesエントリを削除(脆弱性が修正済みのため不要)
lodash 4.18.1がminimumReleaseAge (7日) を超えたため、 minimumReleaseAgeExcludeからlodash/lodash-esを削除。 overridesによるセキュリティ強制は維持。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ignoreDeprecations: "6.0"とcomposite: falseを追加 - lib: DOMにES2023を追加 - webpack.config.jsをESLint ignoresに追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pnpm.overrides で固定したセキュリティ更新が上流の patched release で不要になった際、人手で外す手間と外し忘れによる古い override 残存を防ぐため、override を定期的に prune する workflow を追加する。 毎週月曜 6 時 UTC に走らせ、不要になった override を削除する PR を自動作成する。im-core / cdp-client / rt.js / trust360 で 同じ構成が既に運用されており、それと同じ pinact 済み action SHA / pnpm 10.33.0 / setup-node の node-version-file 連動を採用している。 Co-Authored-By: Claude <noreply@anthropic.com>
audit で 2 つの high vuln を検出して CI が落ちていた: - tmp <0.2.6 (GHSA-ph9p-34f9-6g65, path traversal) - fast-uri <=3.1.1 (GHSA-v39h-62p7-jpjc, path traversal) tmp は既存 override (>=0.2.4) では 0.2.4 / 0.2.5 を許してしまい 新 CVE に該当するため、>=0.2.6 に bump する。tmp 0.2.6 は本日 (2026-05-27) リリースされたばかりで minimumReleaseAge (1 週間) に抵触するため minimumReleaseAgeExclude に追加する。 fast-uri は ts-loader > webpack > schema-utils > ajv 経由の 推移依存。同じ高重要度 CVE を rt.js / cdp-client / trust360 等 他リポでも fast-uri@<=3.1.1: '>=3.1.2' で対応済みの組み合わせ。 Co-Authored-By: Claude <noreply@anthropic.com>
master 由来の test.yml は yarn install --immutable / yarn test を 使っていたが、本ブランチの pnpm 移行で yarn.lock を削除した結果 yarn install が exit する。NODE_OPTIONS=--openssl-legacy-provider も webpack 5.105+ では不要になるため削除する。 他リポ (cdp-client / rt.js / trust360) と同じ pinact 済み action SHA / pnpm 10.33.0 / node 24.14.1 / Security audit step の構成に 揃える。 合わせて vitest.config.ts を eslint.config.mjs の ignores に追加 する。flat config の typescript-eslint パーサが parserOptions.project に含まれない vitest.config.ts を解析しよう として parsing error を出すため。 Co-Authored-By: Claude <noreply@anthropic.com>
932503a to
9215594
Compare
依存ツリーが進んだ結果、natural resolution が patched 範囲内に 収まるようになった以下の override を削除する: - brace-expansion@<1.1.13: '>=1.1.13' → 経路上 >=1.1.13 (2.1.0/5.0.5) - braces@<3.0.3: '>=3.0.3' → 経路上 3.0.3 が natural - fast-uri@<=3.1.1: '>=3.1.2' → 経路上 3.1.2 が natural - http-proxy-middleware@<2.0.7: '>=2.0.7' → 経路上 2.0.9 が natural - micromatch@<4.0.8: '>=4.0.8' → 経路上 4.0.8 が natural - node-forge@<1.4.0: '>=1.4.0' → 依存ツリーに含まれていない (dead) - webpack-dev-middleware@<=5.3.3: '>=5.3.4' → 経路上 7.4.5 が natural - webpack-dev-server@<=5.2.0: '>=5.2.1' → 直接依存 5.2.3 で適用外 - lodash@<=4.17.23: '>=4.18.1' → 経路上 4.18.1 が natural - lodash-es@<=4.17.23: '>=4.18.1' → 依存ツリーに含まれていない (dead) audit (pnpm dlx pnpm@11.0.0-rc.1 audit) で high 0 / moderate 8 を キープしていることを確認済み。pnpm test / build も pass。 tmp の override (および minimumReleaseAgeExclude) のみ残す: tmp 0.2.6 は 2026-05-27 リリースされたばかりで強制適用が必要なため。 Co-Authored-By: Claude <noreply@anthropic.com>
01d8760 to
786bd85
Compare
3 tasks
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.
概要
パッケージマネージャーをpnpmに統一し、セキュリティ設定を追加するPRです。
変更内容
1. パッケージマネージャー移行
packageManagerフィールドで固定)enginesフィールドで固定)2. セキュリティ設定
.npmrc/pnpm-workspace.yamlでセキュリティポリシーを設定audit-level: high(高以上の脆弱性を検知)ignore-scripts: true(postinstall等のスクリプト実行を無効化)save-exact: true(バージョン完全固定)engine-strict: true(Nodeバージョン厳格チェック)minimumReleaseAge: 10080(7日未満のパッケージをブロック)3. 依存関係の最新化
pnpm update --latest)eslint.config.mjs) へ移行 (gts 7.0)4. CI/CD更新
pnpm auditステップを追加確認事項
pnpm install成功pnpm run build成功pnpm run test成功 (テストがある場合)