github / github/codeql

General issue: CWE-116 not reported for unescaped XML output in JavaScript/TypeScript

未關閉
#21,022 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
question
主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 15 小時
30 天內合併 PR
141

描述

**Description**
CodeQL security scan did not recognise the CWE-116 (Improper Encoding or Escaping of Output) in a Sitemap.xml.ts file when unescaped values are embedded into XML output.

**Example**
A sitemap is generated dynamically by interpolating application-derived values
into XML elements:

```ts
function generateSitemap(entries: string[]) {
return `

${entries.map(path => `

${BASE_URL}/${path}

`).join("")}
`;
}
```
Values here are embedded directly into XML elements without escaping.

**Question**
I would like to understand whether this pattern is currently not covered by the JavaScript/TypeScript analysis, or whether the scanning logic intentionally determines that this does not constitute a CWE-116 weakness when generating XML output such as a sitemap.

貢獻指南

開啟貢獻指南

研究方向

Start by reproducing the reported CodeQL result against the Sitemap.xml.ts example and then inspect the JavaScript/TypeScript analysis coverage for XML output. Done means determining whether unescaped XML interpolation is intentionally excluded or should be reported as CWE-116, with the resulting behavior or rationale clearly documented.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, typescript
領域
security
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。