joern
joern copied to clipboard
Kotlin2Cpg : Missing parameter and parameterAssign for Annotation Node
Is your feature request related to a problem? Please describe.
Annotation nodes in Kotlin, don't have parameter
and parameterAssign
nodes
Describe the solution you'd like
Just like Java, Annotation nodes in Kotlin, should have parameter
and parameterAssign
nodes
Steps in Joern Import the following kotlin code
import javax.ws.rs.Path
class MyClass {
@Path("/myPath")
fun myMethod() {
println("Inside myMethod")
}
}
The following query should return parameter value
as in Java
cpg.annotation.name("Path").parameter.l
The following query should return parameterAssign /myPath
as in Java
cpg.annotation.name("Path").parameterAssign.l