voidzero-dev / voidzero-dev/vite-plus

Improve security defaults for `vp install` and other commands when using `npm`

オープン
#1,419 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る
pending triage
主要言語
Rust
スター
5.8k
フォーク
262
平均マージ
23時間 18分
マージ済み PR(30日)
139

説明

### Description

It'd be nice if something could be done in vite-plus specifically to ensure secure defaults if a user is using npm.

See https://nesbitt.io/2026/03/31/npms-defaults-are-bad.html for examples.

### Suggested solution

For safety reasons, we should probably force `vp install` (when not passed a specific package to add) to map to `npm ci`, or at least maybe `npm install --prefer-offline`?

### Alternative

_No response_

### Additional context

It may also be a good idea to have `vp env doctor` point the user to various more-secure options as well, for example using min-release-age if not set, blocking scripts from running on-package-install (`--ignore-scripts`), and so on.

### Validations

- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- [x] Check that there isn't already an issue requesting the same feature.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

`vp install` と `vp env doctor` のコマンドエントリポイントから始め、続いて npm ベースの操作がデフォルト値をどのように選択するかをたどります。パッケージなしの `vp install` を `npm ci` に対応付けること、`--prefer-offline` を使用すること、またはリリースの最小経過期間や無視するスクリプトなどのセキュリティガイダンスを追加することのどこまでがスコープに含まれるのかを明確にします。maintainers が定義されたスコープに合意し、その動作が関連するテストでカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

領域
cli, security
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。