General issue: CWE-116 not reported for unescaped XML output in JavaScript/TypeScript
- 主要语言
- 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.
贡献指南
评估
这个 Issue 还没有评估数据。