mirror of
https://github.com/github/codeql.git
synced 2026-04-22 07:15:15 +02:00
Add the SimpleScalarSanitizer class
The `SimpleScalarSanitizer` class represents common scalar types which cannot realistically carry taint (e.g. primitives/numbers, and eventually UUIDs and Dates)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/** Classes to represent sanitizers commonly used in dataflow and taint tracking configurations. */
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
/**
|
||||
* A node whose type is a common scalar type, such as primitives or their boxed counterparts.
|
||||
*/
|
||||
class SimpleScalarSanitizer extends DataFlow::Node {
|
||||
SimpleScalarSanitizer() {
|
||||
this.getType() instanceof PrimitiveType or
|
||||
this.getType() instanceof BoxedType or
|
||||
this.getType() instanceof NumberType
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user