You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-issue 21 of 26 from the 2026-11-21 bot-review-comment audit. Parent issue: #179 (Bot review comment tidy up).
Audited origin/main HEAD: 2e5cf37. Audit date: 2026-11-21.
== Finding 21 (verbatim from the audit findings file) ==
PR Port jtd-esm-codegen onto the incubator main #169 — Schema ID newlines are written unescaped into generated JS comments (JS injection).
Author: chatgpt-codex-connector[bot], 2026-08-31. Comment: Port jtd-esm-codegen onto the incubator main #169 (comment)
Source: jtd-esm-codegen/src/main/java/io/github/simbo1905/json/jtd/codegen/EsmRenderer.java:31. Current: jtd-esm-codegen/src/main/java/io/github/simbo1905/json/jtd/codegen/EsmRenderer.java:30-31 (raw schema.id() inside // ... header comments).
Flagged: 'an ID containing "safe\nglobalThis.compromised=true;//" causes that assignment to run when the generated validator is imported, so generating code from an untrusted schema permits JavaScript injection; encode newlines/control characters or omit the ID from comments'.
Still applies: header comments still interpolate schema.id() verbatim; jsString() is only applied to SCHEMA_ID assignment, not the comments.
Activity