Skip to content

Add 'View DFG' queries#21384

Draft
asgerf wants to merge 11 commits intogithub:mainfrom
asgerf:view-dfg
Draft

Add 'View DFG' queries#21384
asgerf wants to merge 11 commits intogithub:mainfrom
asgerf:view-dfg

Conversation

@asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 27, 2026

Adds the queries called by github/vscode-codeql#4305


private import codeql.util.Location
private import codeql.dataflow.DataFlow as DF
private import codeql.dataflow.TaintTracking as TT

Check warning

Code scanning / CodeQL

Names only differing by case Warning

TT is only different by casing from Tt that is used elsewhere for modules.
Unlike other languages, Java exported 'ViewCfgQuery' in top-level of the default import (java.qll).

But after the rename to ViewGraphQuery the name is too ambiguous. We can't make an alias for a parameterised module, so instead wrapping it in a module named 'PrintCfg'.
This interface works better when defining the DFG edges in the next commit
Adding this directly in the DataFlow module would expose it publicly via the `DataFlow::` prefix which does not seem desirable. We just want to be able to access it ourselves, so I've put it in its own file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant