-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathSinks.qll
More file actions
48 lines (45 loc) · 1.39 KB
/
Sinks.qll
File metadata and controls
48 lines (45 loc) · 1.39 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
private import go
private import semmle.go.dataflow.DataFlow
private import semmle.go.security.CommandInjectionCustomizations
private import semmle.go.security.OpenUrlRedirectCustomizations
private import semmle.go.security.ReflectedXssCustomizations
private import semmle.go.security.RequestForgeryCustomizations
private import semmle.go.security.SqlInjectionCustomizations
private import semmle.go.security.UnsafeUnzipSymlinkCustomizations
private import semmle.go.security.XPathInjectionCustomizations
private import semmle.go.security.ZipSlipCustomizations
/**
* List of all the sinks that we want to check.
*/
class AllSinks extends DataFlow::Node {
private string sink;
AllSinks() {
this instanceof CommandInjection::Sink and
sink = "command-injection"
or
this instanceof OpenUrlRedirect::Sink and
sink = "open-url-redirect"
or
this instanceof ReflectedXss::Sink and
sink = "reflected-xss"
or
this instanceof RequestForgery::Sink and
sink = "request-forgery"
or
this instanceof SqlInjection::Sink and
sink = "sql-injection"
or
this instanceof UnsafeUnzipSymlink::EvalSymlinksSink and
sink = "unsafe-unzip"
or
this instanceof XPathInjection::Sink and
sink = "xpath-injection"
or
this instanceof ZipSlip::Sink and
sink = "zip-slip"
}
/**
* Gets the sink sink type.
*/
string sinkType() { result = sink }
}