General issue: CWE-116 not reported for unescaped XML output in JavaScript/TypeScript
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
**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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.