File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ private import semmle.code.java.security.QueryInjection
1515private import semmle.code.java.security.RequestForgery
1616private import semmle.code.java.dataflow.internal.ModelExclusions as ModelExclusions
1717private import AutomodelSharedUtil as AutomodelSharedUtil
18+ private import semmle.code.java.security.PathSanitizer as PathSanitizer
1819import AutomodelSharedCharacteristics as SharedCharacteristics
1920import AutomodelEndpointTypes as AutomodelEndpointTypes
2021
@@ -48,7 +49,19 @@ module ApplicationCandidatesImpl implements SharedCharacteristics::CandidateSig
4849 class RelatedLocationType = JavaRelatedLocationType ;
4950
5051 // Sanitizers are currently not modeled in MaD. TODO: check if this has large negative impact.
51- predicate isSanitizer ( Endpoint e , EndpointType t ) { none ( ) }
52+ predicate isSanitizer ( Endpoint e , EndpointType t ) {
53+ (
54+ exists ( t ) and
55+ e .getType ( ) instanceof BoxedType
56+ or
57+ e .getType ( ) instanceof PrimitiveType
58+ or
59+ e .getType ( ) instanceof NumberType
60+ )
61+ or
62+ t instanceof AutomodelEndpointTypes:: TaintedPathSinkType and
63+ e instanceof PathSanitizer:: PathInjectionSanitizer
64+ }
5265
5366 RelatedLocation asLocation ( Endpoint e ) { result = e .asExpr ( ) }
5467
You can’t perform that action at this time.
0 commit comments