-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathYaml.qll
More file actions
33 lines (30 loc) · 909 Bytes
/
Yaml.qll
File metadata and controls
33 lines (30 loc) · 909 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
27
28
29
30
31
32
33
/**
* Provides modeling for the `YAML` and `Psych` libraries.
*/
private import codeql.ruby.dataflow.FlowSteps
private import codeql.ruby.DataFlow
private import codeql.ruby.ApiGraphs
/**
* Gets A Node ends with YAML parse, parse_stream, parse_file methods
*/
API::Node yamlParseNode(API::Node yamlParseInstance) {
result = yamlParseInstance
or
result = yamlParseNode(yamlParseInstance).getReturn()
or
result = yamlParseNode(yamlParseInstance).getBlock()
or
result = yamlParseNode(yamlParseInstance).getAnElement()
or
result = yamlParseNode(yamlParseInstance).getParameter(_)
or
result = yamlParseNode(yamlParseInstance).getMethod(_)
or
result = yamlParseNode(yamlParseInstance).getMember(_)
or
result = yamlParseNode(yamlParseInstance).getArgument(_)
}
/**
* Gets A YAML module instance
*/
API::Node yamlLibrary() { result = API::getTopLevelMember(["YAML", "Psych"]) }