JS: Add spread step in TaintedObject

This commit is contained in:
Asger Feldthaus
2020-11-23 16:22:32 +00:00
parent b5ec26d935
commit ef52c46aed

View File

@@ -63,6 +63,14 @@ module TaintedObject {
src = call.getASourceOperand() and
trg = call.getDestinationOperand().getALocalSource()
)
or
// Spreading into an object preserves deep object taint: `p -> { ...p }`
inlbl = label() and
outlbl = label() and
exists(ObjectLiteralNode obj |
src = obj.getASpreadProperty() and
trg = obj
)
}
/**