mirror of
https://github.com/github/codeql.git
synced 2026-03-05 15:16:47 +01:00
JS: Port PrototypePollutingAssignment
This commit is contained in:
@@ -19,10 +19,13 @@
|
||||
|
||||
import javascript
|
||||
import semmle.javascript.security.dataflow.PrototypePollutingAssignmentQuery
|
||||
import DataFlow::PathGraph
|
||||
import PrototypePollutingAssignmentFlow::PathGraph
|
||||
|
||||
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
||||
where cfg.hasFlowPath(source, sink)
|
||||
from
|
||||
PrototypePollutingAssignmentFlow::PathNode source, PrototypePollutingAssignmentFlow::PathNode sink
|
||||
where
|
||||
PrototypePollutingAssignmentFlow::flowPath(source, sink) and
|
||||
not isIgnoredLibraryFlow(source.getNode(), sink.getNode())
|
||||
select sink, source, sink,
|
||||
"This assignment may alter Object.prototype if a malicious '__proto__' string is injected from $@.",
|
||||
source.getNode(), source.getNode().(Source).describe()
|
||||
|
||||
Reference in New Issue
Block a user