Resolve 21 Dependabot alerts in frontend/package-lock.json

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

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
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, react, vite

Hướng nghiên cứu

Bắt đầu với frontend/package-lock.json và các phiên bản được khai báo của vite, vitest và react-router-dom; chạy npm audit và npm audit --omit=dev để xác nhận các cảnh báo được liệt kê. Trước tiên, xử lý các cảnh báo runtime của react-router, sau đó đánh giá việc nâng cấp các công cụ và chạy bộ kiểm thử frontend gồm 47 kiểm thử. Được xem là hoàn tất khi các cảnh báo Dependabot áp dụng được đã được giải quyết mà không làm hỏng các kiểm thử frontend.

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

Mô tả

What

GitHub reports 21 open Dependabot alerts on main (1 critical, 7 high, 12 moderate, 1 low). All of them are npm packages, all in frontend/package-lock.json. No Python dependency is affected.

They surfaced when #8 merged, which brought frontend/ onto the default branch for the first time. They are not new problems introduced by that PR — the lockfile simply became visible to Dependabot.

Most of this is build tooling, not shipped code

Splitting by what actually reaches a user's browser:

Runtime dependencies — 3 moderate (npm audit --omit=dev):

Package Vulnerable Patched
react-router >= 6.7.0, < 6.30.4 6.30.4
react-router-dom >= 6.30.2, <= 6.30.5 6.30.6
@remix-run/router >= 1.3.0, < 1.23.3 1.23.3

Everything else is dev/test/build tooling — vitest (the one critical), vite, esbuild, postcss, @babel/core, browserslist, nanoid, ws, form-data, jsdom. These run on developer machines and in CI. They do not ship to users.

That does not make them harmless — a compromised build tool can affect what gets built — but it does change the urgency. The critical vitest alert in particular reads much worse in the GitHub banner than it is in practice for this project.

Suggested approach

  1. Fix the three runtime react-router* alerts first. They are patch-level bumps within 6.x, so low risk.
  2. Then the tooling. npm audit fix handles part of it; the rest needs npm audit fix --force, which pulls in major-version bumps — vite 5 → 6+ and vitest 2 → 4 based on the patched versions Dependabot lists. That is a real upgrade, not a lockfile tweak, and should be its own change with the frontend test suite (47 tests) as the check.
  3. Consider enabling Dependabot version updates so the lockfile does not drift this far again.

Current declared versions: vite ^5.4.10, vitest ^2.1.5, react-router-dom ^6.28.0.

Note

Nothing here blocks #4, #5, #6 or #7. Filed so it is tracked rather than sitting as a banner on the repository.

Ngôn ngữ chính
Python
Star
0
Fork
0
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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 UtrechtUniversity/BackToPure

Tất cả issue của UtrechtUniversity/BackToPure

Issue tương tự

Thêm issue về Python

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.