警告
CodeQL CLI データベース バンドルには、CodeQL によって分析されるソース コードのコピーが含まれているため、これらのバンドルは、そのソース コードへのアクセスが許可されているユーザーとのみ共有することをお勧めします。
メモ
この記事では、GitHub Enterprise Server 3.20 の初期リリースに含まれている CodeQL CLI 2.23.9 バンドルで使用できる機能について説明します。
サイト管理者が CodeQL CLI のバージョンをより新しいリリースに更新している場合は、この記事の GitHub Enterprise Cloud バージョンで最新の機能に関する情報を参照してください。
The following CodeQL CLI command syntax is suggested when creating a database bundle for troubleshooting purposes. This sample database bundle command requires CodeQL CLI version 2.17.6 or higher.
codeql database bundle --output=codeql-debug-artifacts.zip --include-diagnostics --include-logs --include-results -- <dir>
For this command, <dir> must be the path to the directory where the CodeQL database was created.
The successful command execution creates a zip file called codeql-debug-artifacts.zip which contains CodeQL troubleshooting information. That file is the database bundle.
This command assumes that the --log-dir command line argument was not used for the database create and database analyze commands. When that command line argument is used, the log files created by those commands will not be included with the database bundle.
Increasing the verbosity for database create and database analyze
If the database create and database analyze commands are not detailed enough for troubleshooting purposes, you can increase their verbosity.
Both commands support the --verbosity command line argument which can be set to progress++ prior to creating a database bundle.