Closed compaluca closed 1 year ago
Thank you!
The current solution should work, if you want to you can use argument
. But since we don't support argumentIndex you'd have to use order
, which should be equivalent here:
cpg.call("INIT_DYNAMIC_CALL").whereNot(_.argument.order(1).isLiteral).l
Made changes to retrofit discussion in https://github.com/testable-eu/sast-tp-framework/issues/49.
Ideally the discovery rule should be: get the
INIT_DYNAMIC_CALL
for which the called function is not a literal. I thought we could use theargument
property and write something like.whereNot(_.argument(1).isLiteral)
, but not sure if the nodes from PHP-CPG at the opcode levels have arguments.@mal-tee : what do you think?