|
| 1 | +# CodeQL CLI changelog |
| 2 | + |
| 3 | +## Release 2.2.3 (2020-06-15) |
| 4 | + |
| 5 | +CodeQL CLI 2.2.3 is the same as version 2.2.2, but re-released with a new |
| 6 | +version number because the `v2.2.2` folder on the download site |
| 7 | +originally contained the 2.2.0 binaries instead of the correct 2.2.2 |
| 8 | +ones. |
| 9 | + |
| 10 | +If you have downloaded release 2.2.2, and `codeql --version` correctly |
| 11 | +identifies itself as being that version, you don't need to upgrade to |
| 12 | +2.2.3. |
| 13 | + |
| 14 | +## Release 2.2.2 (2020-06-12) |
| 15 | + |
| 16 | +- The bundled extractors are updated to match the versions currently |
| 17 | + used on LGTM.com. These are newer than the last release (1.24) of |
| 18 | + LGTM Enterprise. If you plan to upload databases to an LGTM |
| 19 | + Enterprise 1.24 instance, you need to create them with release |
| 20 | + 2.1.4. |
| 21 | + |
| 22 | +### Improvements |
| 23 | + |
| 24 | +- Query evaluations that time out due to a `--timeout` option are no |
| 25 | + longer silently discarded. Instead `codeql` will terminate with exit |
| 26 | + code 33. Commands that evaluate multiple queries will produce as |
| 27 | + much output as they can even if one of the queries times out. |
| 28 | + |
| 29 | +## Release 2.2.1 |
| 30 | + |
| 31 | +There is no CodeQL CLI version 2.2.1. This version number was used |
| 32 | +internally to work around restrictions in the CodeQL for VS Code |
| 33 | +extension. |
| 34 | + |
| 35 | +## Release 2.2.0 (2020-05-29) |
| 36 | + |
| 37 | +- The bundled extractors are updated to match the versions currently |
| 38 | + used on LGTM.com. These are newer than the last release (1.24) of |
| 39 | + LGTM Enterprise. If you plan to upload databases to an LGTM |
| 40 | + Enterprise 1.24 instance, you need to create them with release |
| 41 | + 2.1.4. |
| 42 | +- Starting with this release, the CodeQL CLI can be downloaded either |
| 43 | + as a single `codeql.zip` file containing the CLI for all supported |
| 44 | + platforms, or as a `codeql-PLATFORM.zip` that contains the files for |
| 45 | + just one platform. The single-platform zips are faster to download. |
| 46 | + |
| 47 | +### QL language improvement |
| 48 | + |
| 49 | +- QL now supports the definition of new types as type unions. This |
| 50 | + feature currently allows unions of branches from an already existing |
| 51 | + algebraic data type and unions of database types. |
| 52 | + |
| 53 | +## Release 2.1.4 (2020-05-26) |
| 54 | + |
| 55 | +This release corresponds to release 1.24.x of LGTM Enterprise, and |
| 56 | +should be used when creating databases that will be uploaded to it. |
| 57 | +Future CLI releases (numbered 2.2.x) may produce databases that are not |
| 58 | +backwards compatible with this version of LGTM Enterprise. |
| 59 | + |
| 60 | +For all purposes other than creating databases for LGTM Enterprise we |
| 61 | +recommend that you continue upgrading to newer CLI releases as they |
| 62 | +become available. |
| 63 | + |
| 64 | +### Features added |
| 65 | + |
| 66 | +- A new `codeql query format` command exposes the QL autoformatter for |
| 67 | + use on the command line. |
| 68 | + |
| 69 | +### Bugs fixed |
| 70 | + |
| 71 | +- `-J` command-line options that contain spaces now ought to work on |
| 72 | + Windows. They still do not work reliably on Linux or MacOS, though. |
| 73 | + |
| 74 | +## Release 2.1.3 (2020-05-13) |
| 75 | + |
| 76 | +### Bugs fixed |
| 77 | + |
| 78 | +- Fixes a bug in `codeql execute cli-server` (a helper used by the VS |
| 79 | + Code extension) which would sometimes cause query compilation to |
| 80 | + fail until the extension was restarted. |
| 81 | +- Fixes a bug in `codeql database upgrade` which could lead to |
| 82 | + performance losses if the upgraded database was subsequently used |
| 83 | + with LGTM or the legacy Semmle Core product. |
| 84 | +- Fixes a bug in the QL evaluator that would sometimes lead to crashes |
| 85 | + for queries that use the new `unique` aggregate added in release |
| 86 | + 2.1.0. |
| 87 | +- The value of the `--compilation-cache-size` option is now correctly |
| 88 | + interpreted as a number of megabytes rather than a number of bytes. |
| 89 | + |
| 90 | +## Release 2.1.2 (2020-05-06) |
| 91 | + |
| 92 | +- Updated license terms to allow CI use with GitHub Actions for |
| 93 | + open-source software. |
| 94 | + |
| 95 | +### Potentially breaking changes |
| 96 | + |
| 97 | +- In [query suite definitions](https://help.semmle.com/codeql/codeql-cli/procedures/query-suites.html), filter |
| 98 | + instructions that filter on the `query path` pseudo-tag will now |
| 99 | + always see the relative path to the query expressed with `/` as a |
| 100 | + directory separator, independently of the platform. Previously they |
| 101 | + erroneously used the platform's directory separator, meaning that |
| 102 | + query suites developed on Windows would not work correctly on Unix |
| 103 | + systems (and vice versa) if they used `query path`. Existing suite |
| 104 | + definitions developed on Windows may need to be updated to match the |
| 105 | + new behavior. |
| 106 | + |
| 107 | +### Features added |
| 108 | + |
| 109 | +- A new `codeql test accept` subcommand helps automate updating the |
| 110 | + expected output for unit tests after a desired change in query |
| 111 | + behavior. This can also be done by the new `--learn` option for |
| 112 | + `codeql test run`. |
| 113 | + |
| 114 | +### Bugs fixed |
| 115 | + |
| 116 | +- `codeql database create` will now report an explicit error if given |
| 117 | + a `--command` argument that specifies an empty string. Previously |
| 118 | + this would be accepted initially, leading to confusing failures |
| 119 | + later. |
| 120 | + |
| 121 | +## Release 2.1.1 (2020-04-20) |
| 122 | + |
| 123 | +- The bundled extractors are updated to match the versions currently |
| 124 | + used on LGTM.com. |
| 125 | + |
| 126 | +### Features added |
| 127 | + |
| 128 | +- `codeql resolve queries` accepts a `--format=bylanguage` option. |
| 129 | + This is used to help automated workflows determine which languages |
| 130 | + to create databases for, from the queries that are available to run. |
| 131 | +- It is now possible to attempt to execute `.ql` files that are not in |
| 132 | + a QL pack. This is used by a few specialized internal workflows. |
| 133 | + However, standalone queries cannot import any of the dependencies |
| 134 | + that you would usually declare in a `qlpack.yml` file, so will not |
| 135 | + be useful in most cases. |
| 136 | + |
| 137 | +## Release 2.1.0 (2020-03-27) |
| 138 | + |
| 139 | +- The bundled extractors are updated to match the versions currently |
| 140 | + used on LGTM.com. These are newer than the last release (1.23) of |
| 141 | + LGTM Enterprise. If you plan to upload databases to an LGTM |
| 142 | + Enterprise 1.23 instance, you need to create them with release |
| 143 | + 2.0.1. For more information, see [Preparing CodeQL databases to |
| 144 | + upload to |
| 145 | + LGTM](https://help.semmle.com/lgtm-enterprise/admin/help/prepare-database-upload.html) |
| 146 | + in the LGTM admin help. |
| 147 | + |
| 148 | +### Potentially breaking changes |
| 149 | + |
| 150 | +- If you pass a directory name as a command-line argument to |
| 151 | + `codeql test run`, it will now consider all `.ql` or `.qlref` files |
| 152 | + found under that directory to be test queries, even if they have no |
| 153 | + accompanying `.expected` file. Tests that lack an `.expected` file |
| 154 | + will fail, but will generate an `.actual` file that you can rename |
| 155 | + to `.expected` if you want to use the results. |
| 156 | + |
| 157 | + The goal of this change is to support existing workflows of |
| 158 | + experienced CodeQL users, and also to provide clear error |
| 159 | + indications if an `.expected` file is accidentally lost, renamed, or |
| 160 | + misspelled. |
| 161 | + |
| 162 | + However, if you invoke `codeql test run` on a directory tree that |
| 163 | + contains both tests and non-test queries, you will now encounter |
| 164 | + errors if any of the `.ql` files can't be processed as test queries. |
| 165 | + If you're affected by this change, you can suppress these errors by: |
| 166 | + |
| 167 | + - Adding a `tests` property to this QL pack to define specify |
| 168 | + which directories contain only test queries and associated test |
| 169 | + code. For more information, see |
| 170 | + [About QL packs](https://help.semmle.com/codeql/codeql-cli/reference/qlpack-overview.html). |
| 171 | + - Running `codeql test run` with a new `--strict-test-discovery` |
| 172 | + option. |
| 173 | + |
| 174 | + In the longer term, we recommend that you reorganize the queries so |
| 175 | + that test queries are stored in a directory tree that's separate |
| 176 | + from actual queries. |
| 177 | + |
| 178 | +- `codeql database create` and `codeql database finalize` will no |
| 179 | + longer recognize a `--no-duplicate-code` option. This option has |
| 180 | + never had any effect, and its positive variant `--duplicate-code` |
| 181 | + previously led to a fatal error. |
| 182 | + |
| 183 | +### Features added |
| 184 | + |
| 185 | +- A new XML extractor is included. It is not intended to be used as a |
| 186 | + stand-alone extractor, but rather to augment the data produced by |
| 187 | + other extractors. In particular, the C\# and Java extractors invoke |
| 188 | + it during database creation to include information relevant to the |
| 189 | + analysis of those languages, much like LGTM.com does. |
| 190 | +- Two new plumbing commands `codeql database index-files` and |
| 191 | + `codeql resolve files` have been added for support of invoking the |
| 192 | + XML extractor support. These commands are generally only of interest |
| 193 | + for extractor authors. |
| 194 | +- Two new plumbing commands have been added to `codeql dataset`. The |
| 195 | + `measure` subcommand can be used to collect size information from a |
| 196 | + dataset, and the `check` subcommand can scan a dataset for database |
| 197 | + inconsistencies. These commands are useful when developing a new |
| 198 | + CodeQL extractor. |
| 199 | +- The QL evaluator contains a number of features in support of an |
| 200 | + internal experiment with using machine-learning techniques to |
| 201 | + identify functions in unknown codebases as sources or sinks of |
| 202 | + taint. This includes new command-line options `--ml-model-path` and |
| 203 | + `--native-library-path` to several subcommands. As the new features |
| 204 | + are not yet ready for general use, these new options should be |
| 205 | + ignored by external CodeQL users. |
| 206 | + |
| 207 | +### Bugs fixed |
| 208 | + |
| 209 | +- Fixes a bug that could result in empty databases for C/C++. |
| 210 | + Previously, extraction would mistakenly be skipped for source files |
| 211 | + compiled with the Clang compiler, if the `-fintegrated-cc1` option |
| 212 | + was specified. |
| 213 | +- `codeql database create` and `codeql database init` will now, as |
| 214 | + they have always been documented, refuse to create a database whose |
| 215 | + parent directory doesn't already exist. |
| 216 | +- `codeql test run` will no longer leave `.actual` files from previous |
| 217 | + runs in the file system after a test passes. |
| 218 | + |
| 219 | +### QL language improvements |
| 220 | + |
| 221 | +- QL now supports set literals, and the QL extractor can identify them |
| 222 | + with the `SetLiteral` class. For more information, see [Set literal |
| 223 | + expressions](https://help.semmle.com/QL/ql-handbook/expressions.html#set-literal-expressions) |
| 224 | + in the QL language reference. |
| 225 | +- QL now supports a uniqueness aggregate. This can express constraints |
| 226 | + that there is precisely one value. The syntax is taken from previous |
| 227 | + aggregates such as `min` and `max`. |
| 228 | + |
| 229 | + ``` {.sourceCode .ql} |
| 230 | + unique(int x | x = 4 or x = 2 * 2 | x) |
| 231 | + ``` |
| 232 | +
|
| 233 | +## Release 2.0.6 (2020-03-16) |
| 234 | +
|
| 235 | +### Bugs fixed |
| 236 | +
|
| 237 | +- Fixes a problem preventing `codeql database create` from working |
| 238 | + with Python 3 on macOS. |
| 239 | +- Fixes a problem preventing `codeql database create` from finding |
| 240 | + locally installed Python packages. |
| 241 | +
|
| 242 | +## Release 2.0.5 (2020-03-13) |
| 243 | +
|
| 244 | +- The bundled extractors (which are responsible for converting source |
| 245 | + code to databases for each supported language) are updated to match |
| 246 | + the versions currently used on LGTM.com. These are newer than the |
| 247 | + last release of LGTM Enterprise, so this release should not be used |
| 248 | + if you plan to upload databases to an LGTM Enterprise instance. For |
| 249 | + more information, see [Preparing CodeQL databases to upload to |
| 250 | + LGTM](https://help.semmle.com/lgtm-enterprise/admin/help/prepare-database-upload.html) |
| 251 | + in the LGTM admin help. |
| 252 | +
|
| 253 | +### Features added |
| 254 | +
|
| 255 | +- `codeql test run` has a new `--slice` option that can be used to |
| 256 | + parallelize tests over more machines. |
| 257 | +
|
| 258 | +## Release 2.0.4 (2020-02-21) |
| 259 | +
|
| 260 | +- The bundled extractors (which are responsible for converting source |
| 261 | + code to databases for each supported language) are updated to match |
| 262 | + the versions currently used on LGTM.com. These are newer than the |
| 263 | + last release of LGTM Enterprise, so this release should not be used |
| 264 | + if you plan to upload databases to an LGTM Enterprise instance. For |
| 265 | + more information, see [Preparing CodeQL databases to upload to |
| 266 | + LGTM](https://help.semmle.com/lgtm-enterprise/admin/help/prepare-database-upload.html) |
| 267 | + in the LGTM admin help. |
| 268 | +
|
| 269 | +### Features added |
| 270 | +
|
| 271 | +- Subcommands that execute queries (such as `codeql database analyze`) |
| 272 | + now have a `--timeout` option that can be used to set a timeout to |
| 273 | + automatically cancel query evaluations that appear to diverge. |
| 274 | +- A new plumbing command `codeql query decompile` can display the DIL |
| 275 | + intermediate representations that is included in the output of |
| 276 | + `codeql query compile --dump-qlo --include-dil-in-qlo`. This is |
| 277 | + useful mainly for certain internal workflows; the information |
| 278 | + produced is the same as what `codeql query compile --dump-dil` |
| 279 | + already outputs. |
| 280 | +
|
| 281 | +### Bugs fixed |
| 282 | +
|
| 283 | +- The `--debug` and `--tuple-counting` options to |
| 284 | + `codeql test run` erroneously had no effect. Now they ought to work. |
| 285 | +
|
| 286 | +## Release 2.0.3 (2020-02-12) |
| 287 | +
|
| 288 | +### Bugs fixed |
| 289 | +
|
| 290 | +- Fixes a bug where `codeql test run` would fail with the |
| 291 | + message |
| 292 | + `CatastrophicError: There should be a --library-path option for com.semmle.cli2.LibraryPathOptions.libraryPath but we didn't find it` |
| 293 | + when running tests against the `master` branch of the CodeQL |
| 294 | + libraries for certain languages. |
| 295 | +- Otherwise identical to release 2.0.2. |
| 296 | +
|
| 297 | +## Release 2.0.2 (2020-02-05) |
| 298 | +
|
| 299 | +- The bundled extractors (which are responsible for converting source |
| 300 | + code to databases for each supported language) are updated to match |
| 301 | + the versions currently used on LGTM.com. These are newer than the |
| 302 | + last release of LGTM Enterprise, so this release should not be used |
| 303 | + if you plan to upload databases to an LGTM Enterprise instance. For |
| 304 | + more information, see [Preparing CodeQL databases to upload to |
| 305 | + LGTM](https://help.semmle.com/lgtm-enterprise/admin/help/prepare-database-upload.html) |
| 306 | + in the LGTM admin help. |
| 307 | +- The parent and sibling directories of the unpacked CLI are no longer |
| 308 | + searched recursively for QL packs. QL packs will only be found if |
| 309 | + there's a `qlpack.yml` or `.codeqlmanifest.json` directly in a |
| 310 | + parent or sibling directory. This should eliminate the very long |
| 311 | + disk-scanning delays experienced by users who unpacked earlier |
| 312 | + versions of the CLI in their home directory. |
| 313 | +- Parent and sibling directories of the unpacked CLI will now be |
| 314 | + searched for QL packs as a last resort, even if you give an explicit |
| 315 | + `--search-path` option. This means, for example, that you can define |
| 316 | + a search path in the [per-user configuration file](https://help.semmle.com/codeql/codeql-cli/reference/configuration-overview.html) without it depending on |
| 317 | + where the CLI is unpacked. In particular, the setting can now be |
| 318 | + meaningfully used by users who let the CodeQL for VS Code extension |
| 319 | + manage the downloading and unpacking of the CLI. |
| 320 | +
|
| 321 | +### Security updates |
| 322 | +
|
| 323 | +- The `codeql database create` command and its relatives will no |
| 324 | + longer attempt to find extractors located in the parent and sibling |
| 325 | + directories of the unpacked CLI. This closes a security risk for |
| 326 | + users who unpacked the CodeQL CLI in their home directory. This |
| 327 | + could've resulted in arbitrary code execution if the user unpacked a |
| 328 | + file archive containing a malicious extractor anywhere in the home |
| 329 | + directory. Extractors will now only be found within the unpacked CLI |
| 330 | + itself, or in directories explicitly listed in the `--search-path`. |
| 331 | + It is expected that users will only point `--search-path` to |
| 332 | + locations they trust at least as much as the CLI download itself. |
| 333 | +
|
| 334 | +### Features added |
| 335 | +
|
| 336 | +- This release supports executing query regression tests using the |
| 337 | + `codeql test` command. For further information, see |
| 338 | + [Testing custom queries](https://help.semmle.com/codeql/codeql-cli/procedures/test-queries.html). |
| 339 | +- The error message if you try executing a query against a database |
| 340 | + that needs to be upgraded (which can happen routinely if you're |
| 341 | + using a fresh `master` checkout of the CodeQL libraries with the |
| 342 | + bundled extractors) will now explicitly suggest a |
| 343 | + `codeql database update` command to run. The database is not |
| 344 | + automatically upgraded, as this may make it irreversibly |
| 345 | + incompatible with older versions of the CodeQL libraries. This |
| 346 | + allows users who want to compare behavior of different versions of |
| 347 | + the libraries against the same database to make a copy before they |
| 348 | + upgrade it. |
| 349 | +
|
| 350 | +## Release 2.0.1 (2019-12-17) |
| 351 | +
|
| 352 | +- Corresponds to LGTM Enterprise release 1.23. |
| 353 | +- The bundled extractors (which are responsible for converting source |
| 354 | + code to databases for each supported language) are updated to match |
| 355 | + the extractor versions used in LGTM Enterprise. |
| 356 | +- No other changes to the core CLI. |
| 357 | +
|
| 358 | +## Release 2.0.0 (2019-11-14) |
| 359 | +
|
| 360 | +- First public release. |
| 361 | +
|
0 commit comments