mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +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
|
from Class c, Field f, string reason
|
||||||
where
|
where
|
||||||
c.fromSource() and
|
c.getFile().isJavaSourceFile() and
|
||||||
c.getAStrictAncestor() instanceof TypeSerializable and
|
c.getAStrictAncestor() instanceof TypeSerializable and
|
||||||
f.getDeclaringType() = c and
|
f.getDeclaringType() = c and
|
||||||
not exceptions(c, f) 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