joern icon indicating copy to clipboard operation
joern copied to clipboard

joern server always returns "success": False

Open NemoTR opened this issue 2 years ago • 0 comments

I'm using the newest release of joern, I use the joern server to get the results, the responses of joern server seem not right, here are some examples:

query  : importCpg("xxx")
{'success': False, 'uuid': 'b200f6b0-ff88-4af9-a209-91b4bb652222', 'stdout': 'res2: Option[Cpg] = Some(value = io.shiftleft.codepropertygraph.generated.Cpg@5fb9e2ed)\n', 'stderr': '  ammonite.$sess.cmd1$.<clinit>(cmd1.sc:1)'}

query  : cpg.method.isExternal(false).nameNot("<global>").map(node => Map((node.filename.split("/").apply(5), node.id + ""))).toJsonPretty |> "xxx"
{'success': False, 'uuid': 'e337c629-2b18-4e73-9ada-8c73f2308578', 'stdout': '', 'stderr': '  ammonite.$sess.cmd4$.<clinit>(cmd4.sc:1)'}

query  : cpg.method("<global>").filenameNot(".*:<includes>").map(g => Map((g.filename.split("/").apply(5), g.ast.l))).toJsonPretty |> "xxx"
{'success': False, 'uuid': 'b4383e60-e6f5-45cf-b910-26c7581cb472', 'stdout': '', 'stderr': '  ammonite.$sess.cmd7$.<clinit>(cmd7.sc:1)'}

query  : save
{'success': False, 'uuid': '3f05c24f-128f-40b0-8607-94a879d99459', 'stdout': 'res38: List[workspacehandling.Project] = List(Project(projectFile = ProjectFile(inputPath = "xxx", name = "xxx"), path = xxx, cpg = Some(value = io.shiftleft.codepropertygraph.generated.Cpg@336d03d0)))\n', 'stderr': '  ammonite.$sess.cmd37$.<clinit>(cmd37.sc:1)'}

The "success" status is always false but the file output is right.

The "stderr" is somtimes not empty, just like " ammonite.$sess.cmd37$.(cmd37.sc:1)", seems like some sort of prefix.

Because of this problem, I cannot judge the "success" status exactly.

Hope you can solve it.

NemoTR avatar Apr 29 '22 06:04 NemoTR