fuzzyc2cpg
fuzzyc2cpg copied to clipboard
Inheritance
The linker creates INHERITS_FROM
edges here:
https://github.com/ShiftLeftSecurity/codepropertygraph/blob/10e16ba5d3cd9ed3896c70997fa9f0fd209b6f08/semanticcpg/src/main/scala/io/shiftleft/semanticcpg/passes/linking/linker/Linker.scala#L84
This seems to not work for the fuzzy C frontend. I created a failing test to highlight the issue: https://github.com/ShiftLeftSecurity/codepropertygraph/compare/fabs/inher
My guess would be that INHERITS_FROM_TYPE_FULL_NAME
is not set on TYPE_DECL
nodes. You can look into java2cpg
to see how it's done:
https://github.com/ShiftLeftSecurity/java2cpg/blob/3bdf268a2c0840e09ae27ea3b6f7011bfb75cada/java2cpg/src/main/java/io/shiftleft/java2cpg/domainlogic/structure/IClassStub.java#L66
Please also add a corresponding test in fuzzyc2cpg.