Skip to main content

Creating CodeQL CLI database bundles

Create a database bundle with CodeQL troubleshooting information.

누가 이 기능을 사용할 수 있나요?

CodeQL은(는) 다음 리포지토리 유형에 사용할 수 있습니다.

경고

CodeQL CLI 데이터베이스 번들에는 CodeQL에서 분석되는 소스 코드의 복사본이 포함되어 있으므로 해당 소스 코드에 액세스할 권한이 있는 사용자와만 이 번들을 공유하는 것이 좋습니다.

참고

이 문서에서는 CodeQL CLI 2.20.3 번들에서 사용할 수 있는 기능을 GitHub Enterprise Server 3.16의 초기 릴리스에 포함되어 있습니다.

사이트 관리자가 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.