Problem
The CodeQL CDS extractor does not respect the paths-ignore configuration from the user's CodeQL config file (.github/codeql/codeql-config.yml). When a user configures paths-ignore to exclude certain directories or file patterns from analysis, the JavaScript extractor already honors this via LGTM_INDEX_FILTERS, but the CDS extractor independently discovers and compiles CDS files without consulting the config — resulting in ignored directories still being compiled and extracted.
Expected Behavior
When a paths-ignore list is present in the CodeQL configuration file, the CDS extractor should:
- Skip CDS projects whose directory matches a
paths-ignore pattern
- Filter out individual CDS files that match a
paths-ignore pattern before compilation
- Propagate the patterns to the JavaScript extractor (via
LGTM_INDEX_FILTERS) so compiled .cds.json output files in ignored directories are also excluded from extraction
References
- CodeQL
paths-ignore documentation
- The JavaScript extractor already supports this via the
LGTM_INDEX_FILTERS environment variable, which the CodeQL CLI populates from the config file
Problem
The CodeQL CDS extractor does not respect the
paths-ignoreconfiguration from the user's CodeQL config file (.github/codeql/codeql-config.yml). When a user configurespaths-ignoreto exclude certain directories or file patterns from analysis, the JavaScript extractor already honors this viaLGTM_INDEX_FILTERS, but the CDS extractor independently discovers and compiles CDS files without consulting the config — resulting in ignored directories still being compiled and extracted.Expected Behavior
When a
paths-ignorelist is present in the CodeQL configuration file, the CDS extractor should:paths-ignorepatternpaths-ignorepattern before compilationLGTM_INDEX_FILTERS) so compiled.cds.jsonoutput files in ignored directories are also excluded from extractionReferences
paths-ignoredocumentationLGTM_INDEX_FILTERSenvironment variable, which the CodeQL CLI populates from the config file