voidzero-dev / voidzero-dev/vite-plus

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

Offen
#1,419 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
pending triage
Vorherrschende Sprache
Rust
Sterne
5.8k
Forks
262
Ø Merge
23 Std. 41 Min.
Gemergte PRs (30 T.)
138

Beschreibung

### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne bei den Befehlseinstiegspunkten für `vp install` und `vp env doctor` und verfolge anschließend, wie npm-basierte Vorgänge Standardwerte auswählen. Kläre, ob der Umfang darin besteht, `vp install` ohne Paketangabe auf `npm ci` abzubilden, `--prefer-offline` zu verwenden oder Sicherheitshinweise wie ein Mindestalter von Releases und ignorierte Skripte hinzuzufügen; abgeschlossen ist die Aufgabe, wenn die Maintainer sich auf einen definierten Umfang geeinigt haben und das Verhalten durch relevante Tests abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
cli, security
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.