Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef52c46

Browse files
committed
JS: Add spread step in TaintedObject
1 parent b5ec26d commit ef52c46

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

javascript/ql/src/semmle/javascript/security/TaintedObject.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ module TaintedObject {
6363
src = call.getASourceOperand() and
6464
trg = call.getDestinationOperand().getALocalSource()
6565
)
66+
or
67+
// Spreading into an object preserves deep object taint: `p -> { ...p }`
68+
inlbl = label() and
69+
outlbl = label() and
70+
exists(ObjectLiteralNode obj |
71+
src = obj.getASpreadProperty() and
72+
trg = obj
73+
)
6674
}
6775

6876
/**

0 commit comments

Comments
 (0)