Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Clear the four CodeQL alerts in the release scripts (replaceAll for %2F, comment-line check)

Đang mở Phù hợp với người mới
#5,261 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
83/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, typescript
Lĩnh vực
devtools, security

Hướng nghiên cứu

Bắt đầu với scripts/npm-publish-guard.mjs, scripts/release-notes.mjs và scripts/release-notes.test.mjs, sau đó chạy npm run test:scripts. Cập nhật ba phép thay thế dấu gạch chéo và phần kiểm tra comment được tạo như mô tả trong issue; công việc hoàn tất khi các bài kiểm thử script hiện có đều đạt và lần chạy CodeQL của PR đánh dấu cả bốn cảnh báo là đã sửa.

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

Mô tả

chore v2

Problem

Four CodeQL alerts are open on main, all in release tooling. None is exploitable, but they keep the code-scanning page non-empty, and a dismissed pattern is flagged again wherever it is copied.

Alert Rule Location (v2/main) Flagged Why it is not a vulnerability
#37 js/incomplete-sanitization scripts/npm-publish-guard.mjs:45 (packageUrl) name.replace("/", "%2F") replaces only the first / npm names hold at most one / (@scope/name); inputs are this repo's own manifests; the URL is a read-only registry lookup
#38 js/incomplete-sanitization scripts/release-notes.mjs:229 (registryUrl) same same
#39 js/incomplete-sanitization scripts/release-notes.test.mjs:465 (fake fetch) same test code mirroring the above
#36 js/bad-tag-filter scripts/release-notes.mjs:299 /^<!--.*-->$/ does not match a multi-line comment not a sanitizer: it skips GitHub's one-line <!-- Release notes generated… --> marker while parsing GitHub's own generated notes line by line; an unexpected line aborts with "unrecognized line" rather than passing through

Expected

One PR, no behavior change:

  • .replace("/", "%2F") → .replaceAll("/", "%2F") in all three places.
  • The comment check at release-notes.mjs:299 → line.startsWith("<!--") && line.endsWith("-->").
  • The existing tests in scripts/*.test.mjs pass unchanged (npm run test:scripts); add a case only if a branch loses coverage.
  • After the PR's CodeQL run, the four alerts show as fixed on the PR, and close on main at the next milestone merge.

Notes

  • Found while closing out v2.1.0 (#5243). The two CORS alerts from that release (#42, #43) were dismissed as false positives; #40 and #41 closed as fixed when v2.1.0 replaced origin: "*".
  • No changeset: the scripts are not part of any published package.
Ngôn ngữ chính
TypeScript
Star
91.4k
Fork
11.8k
Merge trung bình
6 giờ 39 phút
Pull request đã merge (30 ngày)
146

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

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 modelcontextprotocol/servers

Tất cả issue của modelcontextprotocol/servers

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.