Context
Sub-issue of #208 — Area 3: Python database extracts node_modules/ template files
Problem
The codeql_database_create tool's Python extractor picks up template .py files from node_modules/ (e.g. aws-cdk init templates with placeholder syntax). These produce py/syntax-error results in the analysis that are always false positives.
Approach
The codeql database analyze CLI does not have specific arguments for excluding paths. Instead, it supports a --codescanning-config flag that accepts a Code Scanning configuration file. This config file supports a paths-ignore list of file/directory paths to exclude during CodeQL dataset extraction (part of database creation).
The right approach is for the ql-mcp server to support managing and consistently referencing its own custom Code Scanning (CodeQL) config file.
From codeql database analyze -h -vv:
--codescanning-config=<file>
[Advanced] Read a Code Scanning configuration file
specifying options on how to create the CodeQL
databases and what queries to run in later
steps. For more details on the format of this
configuration file, refer to https://aka.
ms/code-scanning-docs/config-file. To run
queries from this file in a later step, invoke
codeql database analyze without any other
queries specified.
Requirements
Context
Sub-issue of #208 — Area 3: Python database extracts
node_modules/template filesProblem
The
codeql_database_createtool's Python extractor picks up template.pyfiles fromnode_modules/(e.g. aws-cdk init templates with placeholder syntax). These producepy/syntax-errorresults in the analysis that are always false positives.Approach
The
codeql database analyzeCLI does not have specific arguments for excluding paths. Instead, it supports a--codescanning-configflag that accepts a Code Scanning configuration file. This config file supports apaths-ignorelist of file/directory paths to exclude during CodeQL dataset extraction (part of database creation).The right approach is for the
ql-mcpserver to support managing and consistently referencing its own custom Code Scanning (CodeQL) config file.From
codeql database analyze -h -vv:Requirements
ql-mcpserver to manage and reference a custom CodeQL Code Scanning config file (withpaths-ignoresupport)vscode-codeql-development-mcp-serverextension (for VSIX installations) should expose extension config settings allowing the user to customize:ql-mcpserverpaths-ignorenode_modules/for Python and JavaScript database creation (matching CodeQL's own LGTM.com behavior)