Skip to content

Comments

Add 'View DFG' queries#21356

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

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

Conversation

@asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 23, 2026

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

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.
private import codeql.dataflow.PrintDfg
import MakePrintDfg<Location, JSDataFlow, JSTaintFlow>

external string selectedSourceFile();

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

external string selectedSourceFile();

private predicate selectedSourceFileAlias = selectedSourceFile/0;

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

private predicate selectedSourceFileAlias = selectedSourceFile/0;

external int selectedSourceLine();

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

external int selectedSourceLine();

private predicate selectedSourceLineAlias = selectedSourceLine/0;

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

private predicate selectedSourceLineAlias = selectedSourceLine/0;

external int selectedSourceColumn();

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

external int selectedSourceColumn();

private predicate selectedSourceColumnAlias = selectedSourceColumn/0;

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

private predicate selectedSourceColumnAlias = selectedSourceColumn/0;

module ViewCfgQueryInput implements ViewGraphQueryInputSig<File> {

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.
predicate selectedSourceColumn = selectedSourceColumnAlias/0;

predicate cfgScopeSpan(
predicate callableSpan(

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.

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.
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