- Install VSCode and git
- Install VSCode extension for CodeQL
- Download the latest CodeQL Binary for your system
- Add the unzipped "codeql" folder from the above step to your PATH environment variable
Run the following commands to retrieve the codeql submodule that contains the libraries/queries from the github codeql repository:
cd CodeQL-101
git submodule init
git submodule update
In VSCode, add the "sample_project_db.zip" from the databases folder. Be sure to use "Select Database from Archive" instead of "Select Database from Folder".
This repository contains starter query files and docs for learning to work with the CodeQL tool.
If you're following along outside of the workshop, start with the README files in each part in the queries/csharp folder. Please do these in order, as some of the exercises build on ones from previous sections.
Solutions to these exercises are available in the solutions folder, but please first try them on your own. Keep in mind that there are multiple ways to write a query - each of the solutions is only one way to solve the exercises.