We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 221d949 commit e7166c2Copy full SHA for e7166c2
javascript/ql/src/semmle/javascript/GlobalAccessPaths.qll
@@ -116,6 +116,11 @@ module GlobalAccessPath {
116
// Note: Avoid unneeded materialization of DataFlow::Node.getFile()
117
rhs.getAstNode().getFile() = file
118
)
119
+ or
120
+ // Hard-code JSON methods from the externs file, since they aren't explicitly assigned.
121
+ (accessPath = "JSON.parse" or accessPath = "JSON.stringify") and
122
+ file.getBaseName() = "es5.js" and
123
+ any(TopLevel tl | tl.getFile() = file).isExterns()
124
}
125
126
/**
0 commit comments