Skip to content

The number of paths different from codeql-cli and vscode #17615

Closed
@whyaicn

Description

@whyaicn

I encounter a problem about codeql. I used the following codeql language to detect codeFlows of a project through codeql-cli and vscode respectively:

/**
 * This is an automatically generated file
 * @name Hello world
 * @kind path-problem
 * @problem.severity warning
 * @id java/example/hello-world
 */

 import java
 import semmle.code.java.dataflow.DataFlow
 import semmle.code.java.dataflow.FlowSources

 // For some languages (Java/C++/Python/Swift) you need to explicitly import the data flow library, such as
 // import semmle.code.java.dataflow.DataFlow or import codeql.swift.dataflow.DataFlow

 module MyFlowConfiguration implements DataFlow::ConfigSig {
  predicate isSource(DataFlow::Node source) {
    source.asExpr() = any(MethodCall m| m.getMethod().hasQualifiedName("com.example.app", "UserRegistration", "getUserInput"))
  }
  
  predicate isSink(DataFlow::Node sink) {
    exists(sink)
  }
}

 module Flow = DataFlow::Global<MyFlowConfiguration>;
 import Flow::PathGraph

 from Flow::PathNode source, Flow::PathNode sink
 where Flow::flowPath(source, sink)
 select sink.getNode(), source, sink, "<message>"

But I got different results . In the sarif file, I got 120 codeFlows. However, searching in vscode only yields 26 paths. I don't know why this situation happened

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-responseThe CodeQL team is awaiting further input or clarification from the original reporter of this issue.questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions