Skip to content

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

Closed

Description

@cliffhall

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

Activity

  1. added this to the v2.2.0 milestone on Oct 25, 2026
  2. added
    choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior change
    on Oct 25, 2026
  3. self-assigned this
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreMaintenance: deps, build tooling, CI, cleanup — no user-facing behavior changev2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions