github / github/codeql

False positive: it is valid to escape $ in javascript template string syntax

オープン
#15,077 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
false-positive
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**Description of the false positive**

js/useless-regexp-character-escape triggers for code like:

```javascript
const str = `hello \${name}`;
```

This is invalid, since without the backslash escape, that's a string interpolation of the `name` variable:

```javascript
const str = `hello ${name}`;
```

This triggered in the lit-html codebase on this line: https://github.com/lit/lit/blob/5eea178e0df1199cd29e9d46bc888d52882f18dd/packages/lit-html/src/lit-html.ts#L1418

Link to the code scanning issue: https://github.com/lit/lit/security/code-scanning/15

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。