mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Merge pull request #11308 from tamasvajk/kotlin-non-serializable-field
Kotlin: Exclude .kt files from non serializable field query
This commit is contained in:
@@ -90,7 +90,7 @@ predicate exceptions(Class c, Field f) {
|
||||
|
||||
from Class c, Field f, string reason
|
||||
where
|
||||
c.fromSource() and
|
||||
c.getFile().isJavaSourceFile() and
|
||||
c.getAStrictAncestor() instanceof TypeSerializable and
|
||||
f.getDeclaringType() = c and
|
||||
not exceptions(c, f) and
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Likely Bugs/Serialization/NonSerializableField.ql
|
||||
@@ -0,0 +1,4 @@
|
||||
class Foo {
|
||||
fun f(i: Int) {}
|
||||
fun g(i: Int) { (this::f)(i) }
|
||||
}
|
||||
Reference in New Issue
Block a user