-
Notifications
You must be signed in to change notification settings - Fork 229
Allow CodeQL CLI version (not path) to be specified in workspace settings #509
Description
Is your feature request related to a problem? Please describe.
The current settings schema for the extension lets you specify an arbitrary path to the CodeQL CLI. For security reasons, this setting is ignored when specified in a workspace settings file, because a workspace settings file is usually pulled down as part of the source code. The makes it difficult to specify which version of the CLI a workspace is compatible with. I have this problem to some extent locally, but for customers with multiple query authors working in a repo that depends on a particular version of the CLI and standard libraries, the lack of a way to ensure a consistent version of the CLI is even more frustrating.
Describe the solution you'd like
I'd like a new extension setting, CodeQL > Cli: Version, which allows you the specify the version tag of a public CLI release, and will ensure that the extension downloads and uses that specific release of the CLI. Hopefully, restricting the source of the CLI to our own release feed is sufficiently secure that we can automatically download from there even if it's in the workspace settings. If that is still too scary, though, we could at least put up a prompt saying "this workspace requests version v2.3.6 of the CodeQL CLI. Do you want to download and use it?".
Describe alternatives you've considered
I've considered making my User-level CodeQL CLI path point to a script that tries to figure out the workspace and associated version, but that seems cumbersome for actual customers.