mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #19260 from smowton/smowton/feature/sanitize-enum-types
Java: Add EnumType to SimpleTypeSanitizer
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
category: minorAnalysis
|
||||||
|
---
|
||||||
|
* Enum-typed values are now assumed to be safe by most queries. This means that queries may return fewer results where an enum value is used in a sensitive context, e.g. pasted into a query string.
|
||||||
@@ -23,6 +23,7 @@ class SimpleTypeSanitizer extends DataFlow::Node {
|
|||||||
this.getType()
|
this.getType()
|
||||||
.(RefType)
|
.(RefType)
|
||||||
.getASourceSupertype*()
|
.getASourceSupertype*()
|
||||||
.hasQualifiedName("java.time.temporal", "TemporalAccessor")
|
.hasQualifiedName("java.time.temporal", "TemporalAccessor") or
|
||||||
|
this.getType() instanceof EnumType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user