joern icon indicating copy to clipboard operation
joern copied to clipboard

php2cpg: add parameter default values to CPG

Open maltek opened this issue 1 year ago • 2 comments

function test($param = new Foo) {}

currently there's no way to see that $param has a default value new Foo. I don't think we currently have the concept of default/fallback arguments in our schema, but any way to surface this information for AST queries would already be an improvement.

maltek avatar Jun 07 '23 11:06 maltek

Agreed, this is the workaround I added for JS https://github.com/joernio/joern/pull/2777, but I would be in favor of a default() property of some sorts or edge type to some literal node.

DavidBakerEffendi avatar Jun 12 '23 07:06 DavidBakerEffendi

I have also encountered this issue. Is there any progress now

d1tto avatar Nov 12 '23 13:11 d1tto