v2.7.1
- The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.28) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.28 instance, you need to create them with release 2.5.9.
Potentially breaking changes
-
Previously,
codeql test runwould fall back to looking for an accompanyingqueries.xmlfile if it found aqlpack.ymlthat did not declare an extractor to use when extracting a test database. This has been removed because the internal use case that neccessitated the fallback are now removed. If you suddenly encounter errors that complain of missing extractor declarations, check whether you had aqueries.xmlyou were inadvertently relying on. -
When queries are specified by naming a directory to scan for
*.qlfiles, subdirectories named.codeqlwill now be ignored. The new QL packaging support uses subdirectories with this name of various scratch and caching purposes, so they may contain*.qlfiles that are not intended to be directly user-visible. -
When copying dependencies for CodeQL packages into a query pack bundle,
*.qlfiles in these dependencies will now be included inside of the query pack's.codeqldirectory. -
The tables printed by
codeql database analyzeto summarize the results of diagnostic and metric queries that were part of the analysis have a new format and contains less (but hopefully more pertinent) information. We recommend against attempting to parse this human-readable output programmatically. Instead, use theruns[].tool.driver.invocations[].toolExecutionNotificationsproperty in the SARIF output. -
The experimental plumbing command
codeql pack packlisthas a new format for its JSON results. Previously, the results were a list of paths. Now, the results are an object with a single propertypathsthat contains the list of paths.
Deprecations
-
The output formats SARIF v1.0.0 and SARIF v2.0.0 (Committee Specification Draft 1) have been deprecated. They will be removed in a later version (earliest 2.8.0). If you need this functionality, please file a public issue against https://github.com/github/codeql-cli-binaries, or open a private ticket with GitHub Support and request an escalation to engineering.
-
The
qlpack:instruction in query suite definitions has been deprecated due to uncertainty about whether it is intended to include all the*.qlfiles in the named pack, or only the pack's "default query suite". The behavior of the instruction is determined by whether the named pack declares any default query suite, but this means that a pack starting to declare such a suite may break the behavior of existing query suites that reference the pack from outside.
Bugs fixed
-
The
pathsandpaths-ignoreproperties of a Code Scanning config file specified using--codescanning-configwere being interpreted the wrong way around. -
Queries specified using the
--codescanning-configoption could not be run after an explicit call tocodeql database finalize. -
-Joptions would erroneously be recognized even after--on the command line. -
When running
codeql database analyzeandcodeql database interpret-resultswithout the--sarif-group-rules-by-packflag, the SARIF output did not include baseline lines-of-code counts. -
Expansion of query suites would sometimes fail if a query suite in a compiled query pack referenced that pack itself explicitly.
New language features
- Set literal expressions can now optionally contain a trailing comma after the last element.
New features
-
Beta support for database creation on Apple Silicon, with certain requirement (see the full changelog).
-
codeql database analyzecan now include query-specific help texts for alerts in the SARIF output (for SARIF v2.1.0 or later). The help text must be located in an.mdfile next to (and with the same basename as) the.qlfile for each query. Since this can significantly increase SARIF file size, the feature is not enabled by default; give a--sarif-add-query-helpoption to enable it. -
The query metadata validator now knows about queries that produce alert scores, so these queries no longer need to be run with a
--no-metadata-verificationflag. -
codeql database createandcodeql-finalizehave a new flag--skip-emptythat will cause a language with no extracted source code to be ignored with a warning instead of treated like a fatal error. This can be useful with--db-clusterwhere not all of the languages may exist in the source tree. It will not be possible to run queries against the skipped database. -
codeql resolve extractorandcodeql resolve languagesnow support an extended output format--format=betterjsonwich includes information about each extractor's language-specific options. -
Rudimentary support for parallelizing database creation by importing unfinished databases (or database clusters) into another unfinished database (or cluster) under creation.
-
codeql database create,codeql database index-files, andcodeql database trace-commandsupport a unified syntax for passing language-specific options to the extractor with the new--extractor-optionand--extractor-options-fileoptions.
For more information about the changes included in this release, see the CodeQL CLI changelog.
You can download either the codeql-PLATFORM.zip for your platform, or the generic codeql.zip which contains binaries for all supported platforms. Please ignore the additional "source code" downloads below the .zip artifacts.