joern icon indicating copy to clipboard operation
joern copied to clipboard

[Bug] Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG

Open lmfcode opened this issue 1 year ago • 0 comments

I am using this warehouse and am prompted with the following error https://github1s.com/JoyChou93/java-sec-code/

` joern> version val res167: String = "2.0.242"

joern> importCode("java-sec-code","sec") Using generator for language: JAVASRC: JavaSrcCpgGenerator Creating project sec for code at java-sec-code Project with name sec already exists - overwriting closing/saving project sec

Invoking CPG generator in a separate process. Note that the new process will consume additional memory. If you are importing a large codebase (and/or running into memory issues), please try the following:

  1. exit joern
  2. invoke the frontend: /home/ubuntu/bin/joern/joern-cli/javasrc2cpg -J-Xmx968m java-sec-code --output /home/ubuntu/app/code/workspace/sec/cpg.bin.zip
  3. start joern, import the cpg: importCpg("path/to/cpg") =======================================================================================================

moving cpg.bin.zip to cpg.bin because it is already a database file Creating working copy of CPG to be safe Loading base CPG from: /home/ubuntu/app/code/workspace/sec/cpg.bin.tmp Code successfully imported. You can now query it using cpg. For an overview of all imported code, type workspace. Adding default overlays to base CPG 2024-02-04 18:20:50.836 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.util.HttpUtils.commonHttpClient:java.lang.String(java.lang.String) number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.837 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.838 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.security.ssrf.SocketHookFactory.createSocketImpl:java.net.SocketImpl() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.839 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.840 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.840 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.840 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 2024-02-04 18:20:50.840 WARN CdgPass: Found CDG edge starting at BLOCK node. This is most likely caused by an invalid CFG. Method: org.joychou.config.SafeDomainConfig.safeDomainParser:org.joychou.config.SafeDomainParser() number of outgoing CFG edges from BLOCK node: 3 The graph has been modified. You may want to use the save command to persist changes to disk. All changes will also be saved collectively on exit The graph has been modified. You may want to use the save command to persist changes to disk. All changes will also be saved collectively on exit val res168: io.shiftleft.codepropertygraph.Cpg = Cpg (Graph [21986 nodes]) `

lmfcode avatar Feb 04 '24 10:02 lmfcode