Coder Social home page Coder Social logo

Comments (9)

johannescoetzee avatar johannescoetzee commented on August 11, 2024

I reran the test using the codepropertygraph changes from #1360, and that seems to have addressed the third warning I mentioned in the issue, i.e.

2021-08-18 09:00:54.328 WARN Linker: Invalid AST_PARENT_TYPE=Optional[<empty>]; astChild LABEL=METHOD; astChild FULL_NAME=Optional[VLCVideo.VLCVideo.anonymous_lambda_0]
2021-08-18 09:00:54.328 WARN Linker: Could not create edge. Source lookup failed. edgeType=AST, srcNodeType=<empty>, srcFullName=<empty>, dstNodeType=METHOD, dstNodeId=1005246

The rest of the warnings are still there, as well as the eventual crash. The number of findings also did not change.

from codepropertygraph.

ursachec avatar ursachec commented on August 11, 2024

@max-leuthaeuser looks like this one's for you

from codepropertygraph.

max-leuthaeuser avatar max-leuthaeuser commented on August 11, 2024

I am already on it.

from codepropertygraph.

johannescoetzee avatar johannescoetzee commented on August 11, 2024

Running ./joern-scan --language newc ../../test_repos/vlc --tags <TAG> for any specific tag doesn't result in the same crash, but ./joern-scan --language newc ../../test_repos/vlc --tags all does. The crash is probably due to a specific query being broken

from codepropertygraph.

johannescoetzee avatar johannescoetzee commented on August 11, 2024
./joern-scan --language newc ../../test_repos/vlc --tags default,badfn,metrics,integers,uaf,setxid,badimpl,posix,race-condition,sql-injection,strings,xss | wc
  19669  160657 2582127

Only running queries with tags gives ~20k findings, so much closer to fuzzyc.

from codepropertygraph.

max-leuthaeuser avatar max-leuthaeuser commented on August 11, 2024

The issues within the MemberAccessLinker and AccessPathUsage are also known to me. They are due to missing of a proper CallExpression handling (this argument, call receiver, etc.). Its already on my TODO list.

from codepropertygraph.

johannescoetzee avatar johannescoetzee commented on August 11, 2024

The crash seems to be triggered by the simple-constant-detection query:

({cpg.assignment
  .groupBy(_.argument.order(1).code.l)
  .flatMap {
    case (_: List[String], as: Traversal[Assignment]) => Option(as.l)
    case _                                            => Option.empty
  }
  .filter(_.size == 1)
  .flatMap {
    case as: List[Assignment] =>
      Option(as.head.argument.head, as.head.argument.l.head.typ.l)
    case _ => Option.empty
  }
  .filter {
    case (_: Identifier, ts: List[Type]) =>
      ts.nonEmpty &&
        ts.head.namespace.l.exists { x =>
          x.name.contains("<global>")
        } &&
        !ts.head.fullName.contains("[]")
    case _ => false
  }
  .flatMap {
    case (i: Identifier, _: List[Type]) => Option(i)
    case _                              => Option.empty
  }}).l

from codepropertygraph.

johannescoetzee avatar johannescoetzee commented on August 11, 2024

Details about an issue that explains some of the discrepancies between findings using the new and old frontends can be found here: joernio/joern#577. It looks like, when using the new frontend, joern-scan incorrectly reports twice for functions defined in header files. I opened that issue in the joern repo, since I'm not sure where the fix for it will happen.

from codepropertygraph.

max-leuthaeuser avatar max-leuthaeuser commented on August 11, 2024

Running c2cpg on VLC does not crash anymore and the query in question also runs fine.
Closing this.
(other warnings, e.g., header files missing and unsupported AST nodes are tackled separately)

from codepropertygraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.