File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/security/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,6 +196,22 @@ module CleartextLogging {
196196 trg .( DataFlow:: SourceNode ) .flowsTo ( write .getBase ( ) )
197197 )
198198 or
199+ // A property-copy step,
200+ exists ( DataFlow:: PropWrite write , DataFlow:: PropRead read |
201+ read = write .getRhs ( )
202+ or
203+ exists ( DataFlow:: MethodCallNode stringify |
204+ stringify = write .getRhs ( ) and
205+ stringify = DataFlow:: globalVarRef ( "JSON" ) .getAMethodCall ( "stringify" ) and
206+ stringify .getArgument ( 0 ) = read
207+ )
208+ |
209+ exists ( write .getPropertyNameExpr ( ) ) and
210+ exists ( read .getPropertyNameExpr ( ) ) and
211+ src = read .getBase ( ) and
212+ trg = write .getBase ( ) .getALocalSource ( )
213+ )
214+ or
199215 // Taint through the arguments object.
200216 exists ( DataFlow:: CallNode call , Function f |
201217 src = call .getAnArgument ( ) and
You can’t perform that action at this time.
0 commit comments