mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge pull request #11299 from tamasvajk/kotlin-nested-serializable
Kotlin: Exclude .kt files from serializable inner class query
This commit is contained in:
@@ -77,7 +77,7 @@ predicate exceptions(NestedClass inner) {
|
||||
|
||||
from NestedClass inner, Class outer, string advice
|
||||
where
|
||||
inner.fromSource() and
|
||||
inner.getFile().isJavaSourceFile() and
|
||||
isSerializable(inner) and
|
||||
outer = enclosingInstanceType+(inner) and
|
||||
not isSerializable(outer) and
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Likely Bugs/Serialization/NonSerializableInnerClass.ql
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.io.Serializable
|
||||
|
||||
class A {
|
||||
class X : Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
inner class X : Serializable {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user