CodeQL: the libraries and queries that power security researchers around the world, as well as code scanning in GitHub Advanced Security
Перейти к файлу
Erik Krogh Kristensen 54e449f3c6 QL: Merge pull request #5 from github/qltest-testing
Get qlTest to work
2021-05-26 14:48:20 +02:00
.devcontainer QL: More cleanup 2021-05-26 13:25:43 +02:00
.github/workflows QL: Update workflow files 2021-05-26 11:50:37 +02:00
.vscode Initial commit 2021-05-26 11:32:30 +02:00
extractor QL: Support expression annotations 2021-05-26 12:21:19 +00:00
generator QL: Support expression annotations 2021-05-26 12:21:19 +00:00
node-types QL: fix snake_casing of generated ql identifiers 2021-05-26 11:12:05 +00:00
ql QL: Merge pull request #5 from github/qltest-testing 2021-05-26 14:48:20 +02:00
scripts Initial commit 2021-05-26 11:32:30 +02:00
tools QL: Fix commands on Windows (take 2) 2021-05-26 12:24:54 +01:00
.codeqlmanifest.json Initial commit 2021-05-26 11:32:30 +02:00
.gitattributes Initial commit 2021-05-26 11:32:30 +02:00
.gitignore Initial commit 2021-05-26 11:32:30 +02:00
Cargo.lock QL: Support expression annotations 2021-05-26 12:21:19 +00:00
Cargo.toml Initial commit 2021-05-26 11:32:30 +02:00
README.md QL: Update Readme 2021-05-26 11:46:34 +02:00
codeql-extractor.yml Initial commit 2021-05-26 11:32:30 +02:00
codeql-ql.code-workspace Initial commit 2021-05-26 11:32:30 +02:00
create-extractor-pack.ps1 Initial commit 2021-05-26 11:32:30 +02:00
create-extractor-pack.sh Initial commit 2021-05-26 11:32:30 +02:00

README.md

QL analysis support for CodeQL

Under development.

Building the tools from source

Install Rust, then run:

cargo build --release

Generating the database schema and QL library

The generated ql/src/ql.dbscheme and ql/src/codeql_ql/ast/internal/TreeSitter.qll files are included in the repository, but they can be re-generated as follows:

./create-extractor-pack.sh

Building a CodeQL database for a QL program

First, get an extractor pack:

Run ./create-extractor-pack.sh (Linux/Mac) or .\create-extractor-pack.ps1 (Windows PowerShell) and the pack will be created in the extractor-pack directory.

Then run

codeql database create <database-path> -l ql -s <project-source-path> --search-path <extractor-pack-path>

Running qltests

Run

codeql test run <test-path> --search-path <repository-root-path>