A repo used in a demo of internal data extensions for code scanning.
This requires vscode-codeql v1.7.13 or later and CodeQL CLI v2.12.3 or later.
- Clone this repository in a sibling directory to a checkout of
codeql
- In the repo's root directory, run:
gh codeql database create --overwrite --language javascript --source-root src db
- Open the workflow file
codeql-internal-data-extensions-demo.code-workspace
in vscode. - In vscode, set
"codeQL.runningQueries.useExtensionPacks": "all"
in your user settings - Run
codeql/javascript/ql/src/Security/CWE-078/CommandInjection.ql
. - You should see a single result.
- Open
.github/codeql/extensions/custom-extensions.yml
and comment out one of theaddsTo
blocks. - Re-run the query and you should see no results.
The extension pack defined at .github/codeql/extensions
will automatically be used in code scanning.