github / github/codeql

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

オープン
#21,022 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。