aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/php/injections.scm
blob: 8d1b974026717076873b386abbe7892b837ab6e9 (plain) (blame)
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
((text) @injection.content
 (#set! injection.language "html")
 (#set! injection.combined))

((comment) @injection.content
 (#set! injection.language "comment"))

((function_call_expression
 function: (name) @_function
 arguments: (arguments . (argument (_ (string_value) @injection.content))))
 (#match? @_function "^preg_")
 (#set! injection.language "regex"))

((function_call_expression
 function: (name) @_function
 arguments: (arguments (_) (argument (_ (string_value) @injection.content))))
 (#match? @_function "^mysqli_")
 (#set! injection.language "sql"))

((member_call_expression
 object: (_)
 name: (name) @_function
 arguments: (arguments . (argument (_ (string_value) @injection.content))))
 (#match? @_function "^(prepare|query)$")
 (#set! injection.language "sql"))