Skip to content

CodeQL: pre-existing alerts surfaced on #1151 (ReDoS ×2, code construction ×11) #1152

Closed

Description

@sebyx07

CodeQL on #1151 (sweep 5) flagged 13 alerts in files that PR did not change. CodeQL says itself: "Alerts not introduced by this pull request might have been detected because the code changes were too large." They predate sweep 5; this issue tracks them for the audit round (plan 101b slice 20).

Severity Rule Site
high js/polynomial-redos packages/cli/src/error-contract.ts:58 — strings starting ${{ with many ${
high js/polynomial-redos packages/cli/src/templates/island.ts:201 — many /
medium js/code-injection (code construction from an unsanitized value) packages/core/src/exercise-hint.ts:74,77
medium same packages/mcp/src/catalog-errors.ts:32
medium same packages/testing/src/cassette-errors.ts:61
medium same packages/testing/src/e2e-errors.ts:42
medium same packages/testing/src/job-sim-errors.ts:62 (×3), :123
medium same packages/testing/src/seed-graph-error.ts:34 (×2)

The "code construction" sites render a fix: or a hint as TypeScript text that is printed for a person or an agent to read, never evaluated. Each still needs an explicit verdict: escape it through tsLiteral/renderFixLiteral, or dismiss it with that reason. The two ReDoS sites take author-written source, but they should be linear regardless.

Also still open on main, older: js/resource-exhaustion (realtime/src/thundering-herd.ts), js/useless-regexp-character-escape (templates/scaffold-container*.ts), js/incomplete-url-substring-sanitization (storage/src/upload.ts), js/prototype-polluting-assignment (core/src/wire-dates.ts), js/incomplete-multi-character-sanitization (scripts/factory-names-declarations.ts, ui/src/catalog/parse-component.ts).

Activity

  1. developerz-ai commented on Nov 16, 2026

    @developerz-ai
    Contributor

    Qualified as a bug: pre-existing CodeQL alerts in shipped packages — 2 high js/polynomial-redos (CLI) and 11 medium js/code-injection at fix:/hint rendering sites (core, mcp, testing) — plus the older-on-main set. Each alert needs an explicit verdict, not silence.

    Scope

    • g1 — CLI ReDoS. packages/cli/src/error-contract.ts:58 and packages/cli/src/templates/island.ts:201 become linear for adversarial many-${ and many-/ input; pathological-input tests pin it.
    • g2 — code construction. Every listed core/mcp/testing site renders through tsLiteral/renderFixLiteral (or an equivalent) or carries a recorded dismissal saying the text is printed, never evaluated.
    • g3 — older runtime alerts. realtime/src/thundering-herd.ts, templates/scaffold-container*.ts, storage/src/upload.ts, core/src/wire-dates.ts — fixed or explicitly dismissed with a concrete reason.
    • g4 — sanitization. scripts/factory-names-declarations.ts and ui/src/catalog/parse-component.ts handle nested/overlapping payloads, with tests.

    Acceptance

    • All 13 sweep-5 alerts and every older-on-main alert carry a verdict: fixed, or dismissed with the reason recorded.
    • bun run verify passes; no stable X_* code or fix:-string semantics change.
    • The two ReDoS sites are covered by pathological-input tests.

    Handing this to the fleet's triage next.

    🤖 Posted by developerz.ai — an automated agent, not a human.

  2. developerz-ai commented on Nov 16, 2026

    @developerz-ai
    Contributor

    Handed over: this is filed for the fleet's triage, which will scope it and mint the coding tasks. Nothing has started yet — triage may still come back with a question here before work begins. The 13 sweep-5 alerts and the older-on-main set each still need their verdict (fix, or a recorded dismissal), so this stays open until that lands.

    🤖 Posted by developerz.ai — an automated agent, not a human.

  3. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Tracking pull request #1261 for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions