@@ -27,7 +27,8 @@ class EventContextAccessConfiguration extends DataFlow::Configuration {
27
27
override predicate isSink ( DataFlow:: Node sink , DataFlow:: FlowLabel lbl ) {
28
28
sink instanceof DataFlow:: PropRead and
29
29
lbl instanceof ParsedLabel and
30
- not exists ( DataFlow:: PropRead n | sink = n .getBase ( ) )
30
+ not exists ( DataFlow:: PropRead n | sink = n .getBase ( ) ) and
31
+ not sink .asExpr ( ) .getFile ( ) .getBaseName ( ) .matches ( "%.test.ts" )
31
32
}
32
33
33
34
override predicate isAdditionalFlowStep (
@@ -52,11 +53,6 @@ class EventContextAccessConfiguration extends DataFlow::Configuration {
52
53
}
53
54
54
55
from EventContextAccessConfiguration cfg , DataFlow:: PathNode source , DataFlow:: PathNode sink
55
- where
56
- cfg .hasFlowPath ( source , sink ) and
57
- not sink .getNode ( ) .asExpr ( ) .getFile ( ) .getBaseName ( ) .matches ( "%.test.ts" )
56
+ where cfg .hasFlowPath ( source , sink )
58
57
select sink .getNode ( ) , source , sink ,
59
- "This context property may not exist in default setup workflows. If all uses are safe, add it to the list of "
60
- + "context properties that are known to be safe in " +
61
- "'queries/default-setup-event-context.ql'. If this use is safe but others are not, " +
62
- "dismiss this alert as a false positive."
58
+ "This event context property may not exist in default setup workflows."
0 commit comments