A starter workspace to use with the CodeQL extension for Visual Studio Code. For more information, see the vscode-codeql
repo.
- Install Visual Studio Code.
- Install the CodeQL extension for Visual Studio Code.
- Clone this repository to your computer.
- Make sure to include the submodules, either by
git clone --recursive
or bygit submodule update --init --remote
after clone. - Use
git submodule update --remote
regularly to keep the submodules up to date.
- Make sure to include the submodules, either by
- In VS Code, click File > Open Workspace. Select the file
vscode-codeql-starter.code-workspace
in your checkout of this repository. - You will see several folders open in the left sidebar:
- The
ql
folder contains the open-source CodeQL standard libraries for C/C++, C#, Java, JavaScript, and Python. It tracks thelgtm.com
branch. You can run the standard queries from here, and browse the libraries. - The
codeql-go
folder contains the open-source CodeQL standard libraries for Go. It tracks thelgtm.com
branch. You can run the standard queries from here, and browse the libraries. - The folders named
codeql-custom-queries-<language>
are ready for you to start developing your own custom queries for each language, while using the standard libraries. There are some example queries to get you started.
- The
- Follow the documentation for the CodeQL extension to learn how to set up the extension, add a database and run queries against it. Have fun!
If you want to privately share your CodeQL queries with your teammates using this project as a template:
- Create an empty, private project in the organization you want.
- Clone this project locally:
git clone git@github.com:github/vscode-codeql-starter.git
- Add a remote to the local copy
git remote add my-org git@github.com:<MY-ORG>/vscode-codeql-starter.git
- Push the code to the new remote:
git push my-org main
GitHub does not allow private forks of public repositories.
This project welcomes contributions. See CONTRIBUTING.md for details.
Issues and suggestions should be reported in the vscode-codeql
repo.
This project is licensed under the MIT License.
The CodeQL extension for Visual Studio Code is licensed under the MIT License. The version of CodeQL used by the CodeQL extension is subject to the GitHub CodeQL Terms & Conditions.