Releases: github/codeql-cli-binaries
v2.5.8
- The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
Potentially breaking changes
- The QL compiler now verifies that
@security-severityquery metadata is numeric. You can disable this verification by passing the--no-metadata-verificationflag.
New features
- The
database index-filesanddatabase trace-commandCLI commands now support--threadsand--ramoptions, which are passed to extractors as suggestions. - The
database finalizeCLI command now supports the--ramoption, which controls memory usage for finalization. - The
database createCLI command now supports the--ramoption, which controls memory usage for database creation. - The
generate query-helpCLI command now support rendering query help in SARIF format.
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.
v2.5.7
The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
-
codeql database createandcodeql database initcan now automatically recognise the languages present in checkouts of GitHub repositories by making an API call to the GitHub server. -
Operations that make outgoing HTTP calls (that is,
codeql github upload-resultsand the language-detection feature described above) now support the use of HTTP proxies. To use a proxy for HTTPS requests specify an$https_proxyenvironment variable. -
The QL language now has a new method
toUnicodeon theinttype. This method converts Unicode codepoint to a one-character string. For example,65.toUnicode() = "A",128512.toUnicode()results in a smiley, andany(int i | i.toUnicode() = "A") = 65.
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.
v2.5.6
The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
-
codeql database create(and the plumbing commands it comprises) now supports creating databases for a source tree with several languages while tracing a single build. This is enabled by a new--db-clusteroption. Once created, the multiple databases must be analyzed one by one. -
codeql database createandcodeql database initnow accept an--overwriteargument which will lead existing CodeQL databases to be overwritten. -
codeql database analyzenow supports "diagnostic" queries, which are intended to report information about the analysis process itself rather than problems with the analyzed code. The results of these queries will be summarized in a table printed to the terminal whencodeql database analyzefinishes. They are also included in the analysis results in SARIF output formats so they can be displayed in Code Scanning. -
codeql github upload-resultshas a--checkout-pathoption which will attempt to automatically configure upload target parameters. -
The CodeQL C++ extractor includes beta support for C++20. This is only available when building codebases with GCC on Linux. C++20 modules are not supported.
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.
v2.5.5
The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
Potentially breaking changes
- When scanning the disk for QL packs and extractors, directories of the form
.../SOMETHING/SOMETHING.testproj(where the twoSOMETHINGare identical) will now be ignored. Names of this form are used bycodeql test runfor ephemeral test databases, which can sometimes contain files that confuse QL compilations.
Features added
-
Query writers can now optionally use
@severityin place of@problem.severityin the metadata for alert queries. -
When exporting analysis results to SARIF v2.1.0, results and metric results now contain a reporting descriptor reference object that specifies the rule that produced them. For metric results, this new property replaces the
metricproperty. -
codeql database analyzenow outputs a table that summarizes the results of metric queries that were part of the analysis. This can be suppressed by passing the--no-print-metrics-summaryflag.
Bugs fixed
- When using the
--sarif-group-rules-by-packflag to place the SARIF rule object for each query underneath its corresponding query pack inruns[].tool.extensions, theruleproperty of result objects can now be used to look up the rule within therulesproperty of the appropriate query pack inruns[].tool.extensions. Previously, rule lookup for result objects in the SARIF output was not well-defined when the--sarif-group-rules-by-packflag was passed.
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.
v2.5.4
This release is identical to release 2.5.3, except that codeql database analyze no longer produces a generated automationDetails.id field when the --sarif-category is not explicitly provided. Previously, the --sarif-category was autogenerated if not present.
Code Scanning users should upgrade to this version and avoid 2.5.3.
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.
v2.5.3
The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
Features added
-
codeql database analyzeandcodeql database interpret-resultswill include additional information in the SARIF output which will enable better integration with Code Scanning. -
In query metadata,
@kind alertand@kind path-alertare now recognized as (more accurate) synonyms of@kind problemand@kind path-problem, respectively. -
The metadata verifier recognizes a new
@kind diagnosticpattern type. Currently the result patterns of diagnostic queries are not verified. This will change in a future CLI release.
Bugs fixed
- Ensure the correct URL is generated during
codeql github upload-resultsfor GitHub Enterprise Server.
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.
v2.5.2
This release is identical to release 2.5.1, except that an internal incompatibility with the CodeQL action (and the codeql-runner that some customers use for CI integrations) has been fixed.
The fix does not affect any use cases where the CLI is downloaded from github/codeql-cli-binaries, so if you're seeing this release there, there's no need to upgrade from 2.5.1.
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.
v2.5.1
The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
Potentially breaking changes
- The QL compiler will now reject queries where the query metadata (if present) at the top of the
.qlfile is inconsistent with the output format of the query. This check can be disabled by giving the--no-metadata-verificationflag.
Bugs fixed
-
Environment variables required for Java extraction are now propagated by the tracer. This may resolve issues with tracing and extraction in the context of certain build systems such as Bazel.
-
A number of
--check-CONDITIONoptions tocodeql database finalizeandcodeql dataset importdesigned to look for consistency errors in the intermediate "TRAP" output from extractors erroneously did nothing. They will now actually print warnings if errors are found.
Features added
-
codeql resolve qlrefis a new command that takes in a.qlreffile for a CodeQL test case and returns the path of the.qlfile it references. -
codeql database analyzeandcodeql database interpret-resultshave a new--sarif-group-rules-by-packoption which will place the SARIF rule object for each query underneath its corresponding query pack inruns[].tool.extensions. -
codeql database finalizeandcodeql dataset importhave a new--fail-on-trap-errorsoption that will make database creation fail if extractors produce ill-formatted "TRAP" data for inclusion into a database. -
codeql database finalizeandcodeql dataset importhave a new--check-undefined-labelsoption that enables stricter consistency checks on the "TRAP" output from extractors.
QL language improvements
supermay now be used unqualified, e.g.super.predicateName(), when the declaring class has multiple super types, as long as the call itself is unambiguous.
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.
v2.5.0
The bundled extractors are updated to match the versions currently used on LGTM.com. These are newer than the last release (1.27) of LGTM Enterprise. If you plan to upload databases to an LGTM Enterprise 1.27 instance, you need to create them with release 2.4.6.
Potentially breaking change
- By default,
codeql testnow performs additional compiler checks when extracting test code written in Java. Existing Java tests that previously passed may therefore fail due to this change, if they do not compile using thejavaccompiler. To allow time to migrate existing tests, the new behavior can be disabled by setting the environment variableCODEQL_EXTRACTOR_JAVA_FLOW_CHECKS=false.
Features added
- Log files that contain output from build processes will now prefix it with
[build-stdout]and[build-stderr]instead of[build]and[build-err]. In particular the latter sometimes caused confusion.
QL language improvements
- The QL language now recognizes new
pragma[only_bind_into](...)andpragma[only_bind_out](...)annotations on expressions. Advanced users may use these annotations to provide hints to the compiler to influence binding behavior and thus indirectly performance.
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.
v2.4.6
This release corresponds to release 1.27.x of LGTM Enterprise, and should be used when creating databases that will be uploaded to it. Future CLI releases (numbered 2.5.x) may produce databases that are not backwards compatible with this version of LGTM Enterprise.
-
Fixed a bug in
codeql test runthat causes tests to fail messily if the freshly-extracted test database needed to be upgraded in order to be compatible with the QL source under test. -
codeql github upload-resultsshould now work correctly against GitHub Enterprise Server instances that are configured with a path prefix.
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.