Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#5,261 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
83/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, typescript
领域
devtools, security

调研方向

先查看 scripts/npm-publish-guard.mjs、scripts/release-notes.mjs 和 scripts/release-notes.test.mjs,然后运行 npm run test:scripts。按照 issue 中的说明更新三处斜杠替换和生成的注释检查;现有脚本测试通过,并且 PR 的 CodeQL 运行将四条警报都标记为已修复,即表示完成。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
TypeScript
星标
91.4k
派生
11.8k
平均合并
6 小时 39 分钟
30 天内合并 PR
146

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/servers 的其他 Issue

查看 modelcontextprotocol/servers 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。