mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
15 lines
225 B
Kotlin
15 lines
225 B
Kotlin
class WhenExpr {
|
|
fun taint() = Uri()
|
|
|
|
fun sink(s: String?) { }
|
|
|
|
fun bad(b: Boolean) {
|
|
val s0 = if (b) taint() else null
|
|
sink(s0?.getQueryParameter())
|
|
}
|
|
}
|
|
|
|
class Uri {
|
|
fun getQueryParameter() = "tainted"
|
|
}
|