github / github/codeql-cli-binaries
codeql database interpret-results: Confusing (and possibly wrong) error message NO_KIND_SPECIFIED
- Dominant language
- No language data
- Stars
- 1k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
Research direction
Start by reproducing the `codeql database analyze` command against the `ql/javascript/ql/src/Security/` directory and inspect the `.ql` files mentioned in the report, especially their `@kind` metadata. Trace the results interpretation path to identify where `NO_KIND_SPECIFIED` is generated. Done means the error identifies the query that caused the metadata failure and the relevant behavior is covered by a regression test, if the repository provides one.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100