Skip to content

Commit 2f3dba9

Browse files
authored
Merge pull request #36400 from github/repo-sync
Repo sync
2 parents de10c43 + 13c9f2d commit 2f3dba9

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Creating CodeQL CLI database bundles
3+
intro: 'You can create a database bundle with {% data variables.product.prodname_codeql %} troubleshooting information.'
4+
allowTitleToDifferFromFilename: true
5+
product: '{% data reusables.gated-features.codeql %}'
6+
versions:
7+
fpt: '*'
8+
ghes: '*'
9+
ghec: '*'
10+
topics:
11+
- Advanced Security
12+
- Code scanning
13+
- CodeQL
14+
---
15+
16+
> [!WARNING]
17+
> {% data variables.product.prodname_codeql_cli %} database bundles contain a copy of the source code being analyzed by {% data variables.product.prodname_codeql %}, therefore we suggest sharing these bundles only with people who are authorized to access that source code.
18+
19+
## About creating {% data variables.product.prodname_codeql_cli %} database bundles
20+
21+
{% data reusables.code-scanning.codeql-cli-version-ghes %}
22+
23+
The {% data variables.product.prodname_codeql_cli %} database bundle command can be used to create a relocatable archive of a {% data variables.product.prodname_codeql %} database.
24+
25+
A copy of a database bundle can be used to share troubleshooting information with your team members or with {% data variables.contact.github_support %}.
26+
27+
The following {% data variables.product.prodname_codeql_cli %} command syntax is suggested when creating a database bundle for troubleshooting purposes:
28+
29+
> [!NOTE]
30+
> 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.
31+
32+
```shell
33+
codeql database bundle --output=codeql-debug-artifacts.zip --include-diagnostics --include-logs --include-results -- <dir>
34+
```
35+
36+
For this command, `<dir>` must be the path to the directory where the {% data variables.product.prodname_codeql %} database was created.
37+
38+
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.
39+
40+
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.
41+
42+
## Increasing the verbosity for `database create` and `database analyze`
43+
44+
If the `database create` and `database analyze` commands are not detailed enough for troubleshooting purposes, you can increase their verbosity.
45+
46+
Both commands support the `--verbosity` command line argument which can be set to `progress++` prior to creating a database bundle.

content/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ children:
2626
- /csv-output
2727
- /extractor-options
2828
- /exit-codes
29+
- /creating-database-bundle-for-troubleshooting
2930
redirect_from:
3031
- /code-security/codeql-cli/codeql-cli-reference
3132
---

data/reusables/code-scanning/codeql-query-tables/java.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
| [Exposure of sensitive information to notifications](https://codeql.github.com/codeql-query-help/java/java-android-sensitive-notification/) | 200 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
8585
| [Exposure of sensitive information to UI text views](https://codeql.github.com/codeql-query-help/java/java-android-sensitive-text/) | 200 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
8686
| [Hard-coded credential in API call](https://codeql.github.com/codeql-query-help/java/java-hardcoded-credential-api-call/) | 798 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} |
87+
| [HTTP request type unprotected from CSRF](https://codeql.github.com/codeql-query-help/java/java-csrf-unprotected-request-type/) | 352 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "x" aria-label="Not included" %} |
8788
| [Improper validation of user-provided array index](https://codeql.github.com/codeql-query-help/java/java-improper-validation-of-array-index/) | 129 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
8889
| [Improper validation of user-provided size used for array construction](https://codeql.github.com/codeql-query-help/java/java-improper-validation-of-array-construction/) | 129 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |
8990
| [Insecure basic authentication](https://codeql.github.com/codeql-query-help/java/java-insecure-basic-auth/) | 522, 319 | {% octicon "x" aria-label="Not included" %} | {% octicon "check" aria-label="Included" %} | {% octicon "check" aria-label="Included" %} |

data/variables/product.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ prodname_codeql_cli: 'CodeQL CLI'
9595
# Update this whenever a new enterprise version of CodeQL is being prepared.
9696
codeql_cli_ghes_recommended_version: >-
9797
{% ifversion ghes < 3.12 %}2.14.6{% elsif ghes < 3.17 %}2.20.3{% endif %}
98-
98+
codeql_cli_version_min_version_create_bundle: '2.17.6'
9999
# Projects v2
100100
prodname_projects_v2: 'Projects'
101101
prodname_projects_v1: >-

0 commit comments

Comments
 (0)