File tree Expand file tree Collapse file tree
csharp/ql/src/utils/model-generator/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,24 +107,24 @@ string qualifierString() { result = "Argument[Qualifier]" }
107107bindingset [ kind]
108108predicate isRelevantSinkKind ( string kind ) { any ( ) }
109109
110+ private predicate isRelevantMemberAccess ( DataFlow:: Node node ) {
111+ exists ( CS:: MemberAccess access | access = node .asExpr ( ) |
112+ access .hasThisQualifier ( ) and
113+ access .getTarget ( ) .isEffectivelyPublic ( ) and
114+ (
115+ access instanceof CS:: FieldAccess
116+ or
117+ access .getTarget ( ) .( CS:: Property ) .getSetter ( ) .isPublic ( )
118+ )
119+ )
120+ }
121+
110122/**
111123 * Language specific parts of the `PropagateToSinkConfiguration`.
112124 */
113125class PropagateToSinkConfigurationSpecific extends CS:: TaintTracking:: Configuration {
114126 PropagateToSinkConfigurationSpecific ( ) { this = "parameters or fields flowing into sinks" }
115127
116- private predicate isRelevantMemberAccess ( DataFlow:: Node node ) {
117- exists ( CS:: MemberAccess access | access = node .asExpr ( ) |
118- access .hasThisQualifier ( ) and
119- access .getTarget ( ) .isEffectivelyPublic ( ) and
120- (
121- access instanceof CS:: FieldAccess
122- or
123- access .getTarget ( ) .( CS:: Property ) .getSetter ( ) .isPublic ( )
124- )
125- )
126- }
127-
128128 override predicate isSource ( DataFlow:: Node source ) {
129129 ( isRelevantMemberAccess ( source ) or source instanceof DataFlow:: ParameterNode ) and
130130 isRelevantForModels ( source .getEnclosingCallable ( ) )
You can’t perform that action at this time.
0 commit comments