mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Java: Add more type-based sanitizers.
This commit is contained in:
@@ -13,6 +13,16 @@ class SimpleTypeSanitizer extends DataFlow::Node {
|
||||
this.getType() instanceof BoxedType or
|
||||
this.getType() instanceof NumberType or
|
||||
this.getType().(RefType).hasQualifiedName("java.util", "UUID") or
|
||||
this.getType().(RefType).hasQualifiedName("java.util", "Date")
|
||||
this.getType().(RefType).getASourceSupertype*().hasQualifiedName("java.util", "Date") or
|
||||
this.getType().(RefType).hasQualifiedName("java.util", "Calendar") or
|
||||
this.getType().(RefType).hasQualifiedName("java.util", "BitSet") or
|
||||
this.getType()
|
||||
.(RefType)
|
||||
.getASourceSupertype*()
|
||||
.hasQualifiedName("java.time.temporal", "TemporalAmount") or
|
||||
this.getType()
|
||||
.(RefType)
|
||||
.getASourceSupertype*()
|
||||
.hasQualifiedName("java.time.temporal", "TemporalAccessor")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user