Security Issue: Risk of Dependency Confusion with `scancode-workbench`
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- build-system, security
調査の方向性
package.json から始めて、scancode-workbench がどのような名前で、どのように含まれているかを確認し、次にリンク先の npm レジストリ URL を確認します。パッケージを private にすべきか、またはその名前を確保すべきかをメンテナーに確認してください。選択した保護が適用され、パッケージ管理ワークフローによってこの名前が dependency confusion にさらされなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
I have identified a potential security risk related to a Dependency Confusion vulnerability within our project. Our package.json refers to the package named scancode-workbench, which, according to our findings, does not exist on the public npm registry. This poses a risk that a malicious package could be uploaded to npm with the same name, leading our build systems to accidentally pull and use the malicious package instead of our intended local or private repository package.
Affected Package
Package Name: scancode-workbench
Current Usage: Referenced in package.json as the project name and included as a dependency.
Version: 4.0.3
Risk Impact
If an attacker were to upload a malicious package to npm under the scancode-workbench name with a higher version number, they could execute arbitrary code within our systems or steal sensitive data, depending on how the package is utilized within our projects.
Every single time anyone would use the command npm install pkg name, the malicious package would be fetched. Even in automated pipelines, the higher version number of the malicious package on the public registry would cause a public vs private dependency confusion and might make systems fetch the malicious version of our package.
Steps to Reproduce
- Check the npm registry for
scancode-workbench: [(https://registry.npmjs.org/scancode-workbench)] - Observe that the package does not exist on npm, presenting a risk for dependency confusion attacks.
Proposed Solutions
To mitigate this risk, we have a couple of options:
-
Claim the Package Name on npm: By claiming the package name on npm, we can prevent unauthorized parties from uploading a malicious package with the same name. This involves creating a minimal, benign package under the
scancode-workbenchname to reserve it. -
Mark the Package as Private: If the package is intended for internal use only and not meant to be published, we should specify this in our
package.jsonby adding"private": true. This ensures that npm will refuse to publish it, avoiding any accidental exposure.Example:
{ "name": "scancode-workbench", "version": "4.0.3", "private": true, "description": "An application for viewing ScanCode results and concluding component origin and license" }
Action Required
- Decide on claiming the package name or marking it as private.
- Implement the chosen solution to secure our package management workflow.
Additional Information
- Reviewing our internal dependency management policies to avoid similar issues in the future.
- Ensuring all developers are aware of the implications of public vs. private packages in npm.
- 主要言語
- TypeScript
- スター
- 174
- フォーク
- 81
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aboutcode-org/scancode-workbench のほかの issue
-
reference scancode.io in README prominently再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1時間未満 初心者へのやさしさ 35/100
aboutcode-org/scancode-workbench#639 · コメント 4 件 ·
-
Support scancode-toolkit v32.3.0 output format changes対応中かも @prakhardixit9793 が 4 日前に担当しました。 オープンgood first issue
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
aboutcode-org/scancode-workbench#634 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
aboutcode-org/scancode-workbench#632 · コメント 5 件 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
nice to have
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
aboutcode-org/scancode-workbench#608 · コメント 1 件 ·
aboutcode-org/scancode-workbench の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DSpace/dspace-angular#6511 ·
メンテナーはふだん 1 日以内に返信
-
area: frontend area:byok bug severity:low
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Phone app shows Unknown for a remote machine whose key changed対応中かも @janicduplessis が今日担当しました。 オープンarea: mobile priority: P3 type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
appandflow/stim#5006 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Area - Local to Cloud Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/vscode-mssql#23209 ·
メンテナーはふだん 1 日以内に返信