File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
cpp/ql/src/Security/CWE/CWE-129 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,10 @@ predicate predictableInstruction(Instruction instr) {
66
66
}
67
67
68
68
module ImproperArrayIndexValidationConfig implements DataFlow:: ConfigSig {
69
- predicate isSource ( DataFlow:: Node source ) { isFlowSource ( source , _) }
69
+ predicate isSource ( DataFlow:: Node source ) {
70
+ isFlowSource ( source , _) and
71
+ not source .getLocation ( ) .getFile ( ) .getRelativePath ( ) .regexpMatch ( "(.*/)?tests?/.*" )
72
+ }
70
73
71
74
predicate isBarrier ( DataFlow:: Node node ) {
72
75
hasUpperBound ( node .asExpr ( ) )
@@ -117,7 +120,8 @@ module ImproperArrayIndexValidationConfig implements DataFlow::ConfigSig {
117
120
module ImproperArrayIndexValidation = TaintTracking:: Global< ImproperArrayIndexValidationConfig > ;
118
121
119
122
from
120
- ImproperArrayIndexValidation:: PathNode source , ImproperArrayIndexValidation:: PathNode sink ,
123
+ ImproperArrayIndexValidation:: PathNode source ,
124
+ ImproperArrayIndexValidation:: PathNode sink ,
121
125
string sourceType
122
126
where
123
127
ImproperArrayIndexValidation:: flowPath ( source , sink ) and
You can’t perform that action at this time.
0 commit comments