|
| 1 | + |
| 2 | +### gh-qldb |
| 3 | + |
| 4 | +Tired of having dozens of CodeQL databases scattered around your file system? Introducing QLDB, a CodeQL database manager. Download, deploy and create CodeQL databases with ease. |
| 5 | + |
| 6 | +QLDB will organize your databases in a hierarchical structure: |
| 7 | + |
| 8 | +``` |
| 9 | +/Users/pwntester/codeql-dbs |
| 10 | +└── github.com |
| 11 | + ├── apache |
| 12 | + │ ├── logging-log4j2 |
| 13 | + │ │ ├── java |
| 14 | + │ │ │ └── fa2f51eb8d5912b92b8aa75693464f3e55d36be9.zip |
| 15 | + │ │ └── javascript |
| 16 | + │ │ └── abf13fabc45a2f51eb8d5912b92b8aa75693464f.zip |
| 17 | + │ └── commons-text |
| 18 | + │ └── java |
| 19 | + │ └── e2b291e92bcc272f98d6ca6723994da985d30e07.zip |
| 20 | + └── pwntester |
| 21 | + └── sample-project |
| 22 | + └── java |
| 23 | + └── 9b84404246d516a11091e74ef4cdcf7dfcc63fa4.zip |
| 24 | +``` |
| 25 | + |
| 26 | +### Usage |
| 27 | + |
| 28 | +``` |
| 29 | +Usage: |
| 30 | + gh qldb [command] |
| 31 | +
|
| 32 | +Available Commands: |
| 33 | + completion Generate the autocompletion script for the specified shell |
| 34 | + create Extracts a CodeQL database from a source path |
| 35 | + download Downloads a CodeQL database from GitHub Code Scanning |
| 36 | + help Help about any command |
| 37 | + install Install a local CodeQL database in the QLDB directory |
| 38 | + path Returns the path to a database stored in the QLDB structure |
| 39 | +
|
| 40 | +Flags: |
| 41 | + -h, --help help for gh-qldb |
| 42 | +``` |
| 43 | + |
| 44 | +### Examples: |
| 45 | + |
| 46 | +#### Create a database |
| 47 | + |
| 48 | +```bash |
| 49 | +gh qldb -n foo/bar -- -s path/to/src -l java |
| 50 | +``` |
| 51 | + |
| 52 | +#### Download a Code Scanning database |
| 53 | + |
| 54 | +```bash |
| 55 | +gh qldb download -n apache/logging-log4j2 -l java |
| 56 | +``` |
| 57 | + |
| 58 | +#### Install a local database in QLDB structure |
| 59 | + |
| 60 | +```bash |
| 61 | +gh qldb install -d path/to/database -n apache/logging-log4j2 |
| 62 | +``` |
| 63 | + |
| 64 | +#### Get information about a database |
| 65 | + |
| 66 | +``` |
| 67 | +gh qldb path -n apache/logging-log4j2 -l java -j |
| 68 | +[ |
| 69 | + { |
| 70 | + "commitSha": "fa2f51e", |
| 71 | + "committedDate": "2023-04-06T06:25:30", |
| 72 | + "path": "/Users/pwntester/codeql-dbs/github.com/apache/logging-log4j2/java/9b84404246d516a11091e74ef4cdcf7dfcc63fa4.zip |
| 73 | + } |
| 74 | +] ``` |
0 commit comments