Security Issue: Risk of Dependency Confusion with `scancode-workbench`
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- build-system, security
Hướng nghiên cứu
Bắt đầu với package.json và xác minh scancode-workbench được đặt tên và đưa vào như thế nào, sau đó kiểm tra URL registry npm được liên kết. Xác nhận với các maintainer xem package nên để ở chế độ private hay cần claim tên đó; hoàn tất khi biện pháp bảo vệ đã chọn được áp dụng và quy trình quản lý package không còn để tên này bị phơi nhiễm trước dependency confusion.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 174
- Fork
- 81
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aboutcode-org/scancode-workbench
-
reference scancode.io in README prominentlyCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 35/100
aboutcode-org/scancode-workbench#639 · 4 bình luận ·
-
good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
aboutcode-org/scancode-workbench#634 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
aboutcode-org/scancode-workbench#632 · 5 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
nice to have
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
aboutcode-org/scancode-workbench#608 · 1 bình luận ·
Tất cả issue của aboutcode-org/scancode-workbench
Issue tương tự
-
fix(worker): keep normal prepare waiting states failure-freeCó thể đã có người làm @LichKing-2234 đã nhận hôm nay. Đang mởagent:codex priority:P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AgoraIO-Extensions/agent-infra#3745 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framingCó thể đã có người làm @Eapp1e đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
makecindy/cindy#7973 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
lingdojo/kana-dojo#33337 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
coder/xum#7733 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
code-yeongyu/senpi#4917 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày