Skip to content

chore: pnpmへ移行しセキュリティ設定を追加#10

Draft
april418 wants to merge 5 commits intomasterfrom
chore/migrate-to-pnpm-security-settings
Draft

chore: pnpmへ移行しセキュリティ設定を追加#10
april418 wants to merge 5 commits intomasterfrom
chore/migrate-to-pnpm-security-settings

Conversation

@april418
Copy link
Copy Markdown

@april418 april418 commented Apr 3, 2026

概要

パッケージマネージャーをpnpmに統一し、セキュリティ設定を追加するPRです。

変更内容

1. パッケージマネージャー移行

  • pnpm 10.33.0 に統一 (packageManager フィールドで固定)
  • Node.js 24.14.1 に統一 (engines フィールドで固定)
  • 旧ロックファイル (yarn.lock / package-lock.json) を削除

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 flat config (eslint.config.mjs) へ移行 (gts 7.0)

4. CI/CD更新

  • GitHub Actionsワークフローのパッケージマネージャーをpnpmに変更
  • pnpm audit ステップを追加
  • Node.jsバージョンを24.14.1に統一

確認事項

  • pnpm install 成功
  • pnpm run build 成功
  • pnpm run test 成功 (テストがある場合)

april418 and others added 5 commits April 3, 2026 22:14
パッケージマネージャーをpnpm 10.33.0に統一し、
セキュリティ関連の設定を追加した。

主な変更:
- .npmrc / pnpm-workspace.yaml でセキュリティポリシーを設定
- 全依存関係を最新バージョンに更新 (pnpm update --latest)
- バージョンを完全固定 (save-exact)
- ESLint flat config (eslint.config.mjs) へ移行 (gts 7.0)
pnpm update --latest および gts 7.0 への移行に伴い、
破壊的変更や新しいlintルールに対応するコード修正を行った。
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>
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