mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Java: Fix IncorrectSerializableMethods.ql using wrong readObject signature
This commit is contained in:
@@ -16,8 +16,9 @@ import java
|
||||
from Method m, TypeSerializable serializable
|
||||
where
|
||||
m.getDeclaringType().hasSupertype+(serializable) and
|
||||
m.getNumberOfParameters() = 1 and
|
||||
m.getAParameter().getType().(RefType).hasQualifiedName("java.io", "ObjectOutputStream") and
|
||||
(m.hasName("readObject") or m.hasName("writeObject")) and
|
||||
(
|
||||
m.hasStringSignature("readObject(ObjectInputStream)") or
|
||||
m.hasName("writeObject(ObjectOutputStream)")
|
||||
) and
|
||||
not m.isPrivate()
|
||||
select m, "readObject and writeObject should be private methods."
|
||||
|
||||
Reference in New Issue
Block a user