voidzero-dev / voidzero-dev/vite-plus

Reject installing package managers without provenance that had provenance previously

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

説明

### Description

Reject installing package managers that had provenance previously. It is similar to [pnpm's `trustPolicy: no-downgrade`](https://pnpm.io/settings#trustpolicy), but for the package managers installed by viteplus internally.

This makes it difficult to attack the package managers.

### Suggested solution

Add the provenance check here: https://github.com/voidzero-dev/vite-plus/blob/491cd3f488fe057b4627a4ea850f6c5c56d50883/crates/vite_install/src/request.rs#L236

- [npm](https://www.npmjs.com/package/npm?activeTab=versions): does not have provenance
- [yarn](https://www.npmjs.com/package/@yarnpkg/cli-dist?activeTab=versions): has provenance for `>=4.9.3`
- [pnpm](https://www.npmjs.com/package/pnpm?activeTab=versions): has provenance for `>= 10.20.0`
- [bun](https://github.com/oven-sh/bun/releases): does not have provenance

### Alternative

_No response_

### Additional context

_No response_

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

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

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

調査の方向性

既存のパッケージマネージャーのインストールと provenance の処理を理解するため、crates/vite_install/src/request.rs の 236 行目付近を読んでください。要求されているダウングレードなしの動作に照らして、列挙されている npm、yarn、pnpm、bun の provenance の詳細を確認してください。以前のバージョンが provenance によって裏付けられていた後に provenance を欠く場合、内部でインストールされたパッケージマネージャーが拒否されれば完了です。

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

評価

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

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

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