Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 2.23 KB

File metadata and controls

39 lines (29 loc) · 2.23 KB
title Creating CodeQL CLI database bundles
shortTitle Creating CodeQL CLI database bundles
intro Create a database bundle with {% data variables.product.prodname_codeql %} troubleshooting information.
allowTitleToDifferFromFilename true
product {% data reusables.gated-features.codeql %}
versions
fpt ghes ghec
*
*
*
redirect_from
/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/creating-database-bundle-for-troubleshooting
/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/creating-database-bundle-for-troubleshooting
contentType how-tos
category
Customize vulnerability detection with CodeQL

{% data reusables.code-scanning.codeql-database-archive-contains-source-code %}

{% data reusables.code-scanning.codeql-cli-version-ghes %}

The following {% data variables.product.prodname_codeql_cli %} command syntax is suggested when creating a database bundle for troubleshooting purposes. This sample database bundle command requires {% data variables.product.prodname_codeql_cli %} version {% data variables.product.codeql_cli_version_min_version_create_bundle %} 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 {% data variables.product.prodname_codeql %} database was created.

The successful command execution creates a zip file called codeql-debug-artifacts.zip which contains {% data variables.product.prodname_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.