Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Square brackets in alert messages are not rendered correctly

オープン
#1,104 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
devtools, security

調査の方向性

JavaScript プロジェクトでクエリを再現し、その後、クエリ履歴ビューの「View Alerts (SARIF)」エントリーポイントを使用して、アラートメッセージがどのようにレンダリングされるかを確認します。アラートがエスケープされた角括弧ではなく「[] test」と表示され、SARIF 仕様に従って引き続き有効であれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug VSCode

Describe the bug
Square brackets in alert messages [ and ] are rendered as \[ and \] respectively.

Version
CodeQL extension version: 1.5.10
CodeQL CLI version: 2.7.5
Platform: darwin x64

To reproduce
Run the following query on a JavaScript (for instance) project:

/**
 * @kind alert
 */
import javascript
select any(File f), "[] test"

Right click the query in the query history view and select "View Alerts (SARIF)". Observe that the square brackets are correctly escaped as \\[ and \\] per the SARIF spec:

Literal square brackets ("[" and "]") in the link text of a plain text message SHALL be escaped with a backslash (""). Since JSON itself treats the backslash as an escape character, the backslash SHALL be doubled.

Observe that the square brackets are not correctly escaped in the alert message:

image

Expected behavior
The alert message should be "[] test"

主要言語
TypeScript
スター
539
フォーク
240
平均マージ
2日 18時間
マージ済み PR(30日)
37

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/vscode-codeql のほかの issue

github/vscode-codeql の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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