Language Server attributes package vulnerability warning to wrong project (MessagePack shown for project that doesn't use it)

Đang mở
#9,022 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, typescript, vscode

Hướng nghiên cứu

Tái hiện cảnh báo trong đầu ra C# và nhật ký Language Server bằng cách sử dụng thiết lập tham chiếu dự án được liệt kê. Bắt đầu với dotnet list Boilerplate.Localization.UnitTests/Boilerplate.Localization.UnitTests.csproj package --include-transitive và hướng dẫn chung về việc thu thập nhật ký trong SUPPORT.md; hoàn tất khi lỗ hổng được quy cho dự án thực sự tham chiếu đến MessagePack.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Project System untriaged

Environment data

dotnet --info output:
VS Code version:
C# Extension version:

C# logs

C# output window contents:

[Warn - 8:57:54 AM] [solution/open] [LanguageServerProjectSystem] Warning while loading /Users/forgery/Work/Guru/Boilerplate/src/Boilerplate.Localization.UnitTests/Boilerplate.Localization.UnitTests.csproj: Package 'MessagePack' 2.5.140 has a known moderate severity vulnerability, https://github.com/advisories/GHSA-4qm4-8hg2-g2xm

See https://github.com/dotnet/vscode-csharp/blob/main/SUPPORT.md#collecting-general-logs for collecting more detailed logs

Steps to reproduce

  1. Open a solution where one project references MessagePack 2.5.140 (e.g. Boilerplate.Orm) and another (e.g. Boilerplate.Localization.UnitTests) does not
  2. Ensure the project without MessagePack references only projects that also do not use MessagePack (e.g. Localization.UnitTests → Localization)
  3. Open the solution in VS Code
  4. Check C# output / Language Server logs

Expected behavior

The MessagePack vulnerability warning should be shown for the project that actually references MessagePack (e.g. Boilerplate.Orm), not for projects that do not depend on it

Actual behavior

The warning is shown for Boilerplate.Localization.UnitTests, which does not reference MessagePack. Verified with dotnet list Boilerplate.Localization.UnitTests/Boilerplate.Localization.UnitTests.csproj package --include-transitive — MessagePack does not appear in the dependency tree

Additional context

  • MessagePack 2.5.140 is a direct dependency of Boilerplate.Orm
  • Boilerplate.Localization.UnitTests only references Boilerplate.Localization (ProjectReference), which has no package dependencies
  • The Language Server attributes the vulnerability to the wrong project
Ngôn ngữ chính
TypeScript
Star
3.1k
Fork
742
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
53

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/vscode-csharp

Tất cả issue của dotnet/vscode-csharp

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.