Actions databases vs. quick-query: generated qlpack file depends on JavaScript, not Actions library

Open
#4,050 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript, vscode
Domain
devtools

Research direction

Reproduce with an Actions database, VSCode database selection, and a Quick Query. Start at extensions/ql-vscode/src/databases/qlpack.ts line 28, then inspect codeql-database.yml and the Actions extractor's JavaScript autobuilder path. Done means the generated qlpack.yml identifies the Actions database so the fresh query's import actions line resolves.

Written by the indexing model from the issue text.

Description

bug VSCode

To reproduce:

Create any Actions database (codeql database create -l actions ...)

Select the database in VSCode

Create a Quick Query

Observe that the qlpack.yml file created depends on javascript-all, and so the import actions line in the fresh query doesn't resolve.

Cause is https://github.com/github/vscode-codeql/blob/main/extensions/ql-vscode/src/databases/qlpack.ts#L28 matching qlpacks vs. dbschemes, and the Actions extractor using the JavaScript dbscheme.

Possible solutions could include looking at the codeql-database.yml file, or having the Actions extractor rename the dbscheme file after invoking the JS autobuilder such that the database can be distinguished from a JS database using the existing dbscheme name heuristic.

Dominant language
TypeScript
Stars
539
Forks
240
Avg merge
2d 6h
Merged PRs (30d)
29

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/vscode-codeql

All issues in github/vscode-codeql

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.