Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed May 31, 2023
1 parent d427c89 commit 9632771
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions queries/default-setup-event-context.ql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class EventContextAccessConfiguration extends DataFlow::Configuration {
override predicate isSink(DataFlow::Node sink, DataFlow::FlowLabel lbl) {
sink instanceof DataFlow::PropRead and
lbl instanceof ParsedLabel and
not exists(DataFlow::PropRead n | sink = n.getBase())
not exists(DataFlow::PropRead n | sink = n.getBase()) and
not sink.asExpr().getFile().getBaseName().matches("%.test.ts")
}

override predicate isAdditionalFlowStep(
Expand All @@ -52,11 +53,6 @@ class EventContextAccessConfiguration extends DataFlow::Configuration {
}

from EventContextAccessConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where
cfg.hasFlowPath(source, sink) and
not sink.getNode().asExpr().getFile().getBaseName().matches("%.test.ts")
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink,
"This context property may not exist in default setup workflows. If all uses are safe, add it to the list of "
+ "context properties that are known to be safe in " +
"'queries/default-setup-event-context.ql'. If this use is safe but others are not, " +
"dismiss this alert as a false positive."
"This event context property may not exist in default setup workflows."

0 comments on commit 9632771

Please sign in to comment.