github / github/codeql-cli-binaries

codeql database interpret-results: Confusing (and possibly wrong) error message NO_KIND_SPECIFIED

オープン
#20 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug CLI
主要言語
言語のデータがありません
スター
1k
フォーク
184
PR マージ指標
30日以内にマージされた PR はありません

説明

Copied from https://github.com/Semmle/ql/issues/2997, filed by @khanhbnv-0950:

> i truy `codeql database analyze ql/javascript/ql/src/Security/ --format=csv -o test.csv`, but i give error
> ```sh
> Shutting down query evaluator.
> Interpreting results.
> A fatal error occurred: Could not process query metadata.
> Error was: No query kind specified(NO_KIND_SPECIFIED).
> ```
> I find a solution, i get check `@id` and `@kind`. I see all file `.ql` in `Security` folder and they exists.
> Can anyone help me!

@max-schaefer suggests this is because some queries in the `ql/javascript/ql/src/Security` directory have unusual values of `@kind` that the results interpretation process does not support.

In any case, the error message is confusing and misleading -- it should at least indicate _which query_ it is complaining about.

@dbartol, do you have an immediate feeling for which code is involved here?

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

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

調査の方向性

まず、`ql/javascript/ql/src/Security/` ディレクトリに対して `codeql database analyze` コマンドを再現し、レポートで言及されている `.ql` ファイルを調査します。特に、それらの `@kind` メタデータを確認します。結果の解釈経路をたどり、`NO_KIND_SPECIFIED` がどこで生成されるのかを特定します。エラーによってメタデータの失敗を引き起こしたクエリが特定され、関連する動作が、リポジトリに用意されていれば、回帰テストでカバーされていれば完了です。

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

評価

領域
cli, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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