joern icon indicating copy to clipboard operation
joern copied to clipboard

Kotlin2Cpg : Missing parameter and parameterAssign for Annotation Node

Open khemrajrathore opened this issue 10 months ago • 0 comments

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

khemrajrathore avatar Apr 09 '24 05:04 khemrajrathore