mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
15 lines
336 B
Plaintext
15 lines
336 B
Plaintext
import javascript
|
|
|
|
// Select all expressions whose string value contains the word "two"
|
|
predicate containsTwo(DataFlow::Node node) {
|
|
node.getStringValue().matches("%two%")
|
|
or
|
|
containsTwo(node.getAPredecessor())
|
|
or
|
|
containsTwo(node.(StringOps::Concatenation).getAnOperand())
|
|
}
|
|
|
|
from Expr e
|
|
where containsTwo(e.flow())
|
|
select e
|