Skip to content

Commit 1a395c5

Browse files
committed
JS: Use sanitizerOut in PrototypePollutingAssignment
1 parent 03bdebe commit 1a395c5

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/PrototypePollutingAssignmentQuery.qll

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,11 @@ class Configuration extends TaintTracking::Configuration {
5555
)
5656
}
5757

58-
override predicate isSanitizerEdge(
59-
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel lbl
60-
) {
58+
override predicate isSanitizerOut(DataFlow::Node node, DataFlow::FlowLabel lbl) {
6159
// Suppress the value-preserving step src -> dst in `extend(dst, src)`. This is modeled as a value-preserving
6260
// step because it preserves all properties, but the destination is not actually Object.prototype.
63-
exists(ExtendCall call |
64-
pred = call.getASourceOperand() and
65-
(
66-
succ = call.getDestinationOperand().getALocalSource()
67-
or
68-
succ = call
69-
) and
70-
lbl instanceof ObjectPrototype
71-
)
61+
node = any(ExtendCall call).getASourceOperand() and
62+
lbl instanceof ObjectPrototype
7263
}
7364

7465
override predicate isAdditionalFlowStep(

0 commit comments

Comments
 (0)