forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringOps.ql
More file actions
26 lines (17 loc) · 766 Bytes
/
StringOps.ql
File metadata and controls
26 lines (17 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import javascript
query StringOps::Concatenation concatenation() { any() }
query StringOps::ConcatenationOperand concatenationOperand() { any() }
query StringOps::ConcatenationLeaf concatenationLeaf() { any() }
query StringOps::ConcatenationNode concatenationNode() { any() }
query predicate operand(StringOps::ConcatenationNode node, int i, DataFlow::Node child) {
child = node.getOperand(i)
}
query predicate nextLeaf(StringOps::ConcatenationNode node, DataFlow::Node next) {
next = node.getNextLeaf()
}
query StringOps::HtmlConcatenationRoot htmlRoot() { any() }
query StringOps::HtmlConcatenationLeaf htmlLeaf() { any() }
query string getStringValue(Expr e) {
result = e.getStringValue() and
e.getEnclosingFunction().getName() = "stringValue"
}