You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code accompanying the Getting started with CodeQL blog post on the Tweag blog, modeling the
sarge Python library. This repository is purposedly kept small,
a more complete version of this code can be found at smelc/sarge-security-codeql.
You may also be interested in a variant of this repository that uses Java as the target programming language:
tweag/java-security-codeql.
Installing CodeQL
Download the CodeQL archive from its releases page
(this repository used codeql 2.20.0), and make sure the codeql binary is in your PATH. Then install
CodeQL's standard library and this repository as follows:
mkdir codeql-tutorial
cd codeql-tutorial
git clone https://github.com/github/codeql
git clone https://github.com/tweag/sarge-codeql-minimal
# At this point the "codeql" and "sarge-codeql-minimal" folders are siblingscd sarge-codeql-minimal
Running CodeQL
Create the CodeQL database as follows:
./create-codeql-db.sh
Then run analyses as follows:
./run-codeql-analysis.sh
Development instructions
Prepare the environment as follows (to do only once):