зеркало из https://github.com/github/codeql.git
JS: Add step to a few other queries
This commit is contained in:
Родитель
d4b4d22378
Коммит
4f0e17bf97
|
@ -48,6 +48,12 @@ class Configuration extends TaintTracking::Configuration {
|
|||
f instanceof DocumentUrl and
|
||||
g instanceof DocumentUrl and
|
||||
succ.(DataFlow::PropRead).accesses(pred, "href")
|
||||
or
|
||||
exists(HtmlSanitizerCall call |
|
||||
pred = call.getInput() and
|
||||
succ = call and
|
||||
f = g
|
||||
)
|
||||
}
|
||||
|
||||
override predicate isSanitizerGuard(TaintTracking::SanitizerGuardNode guard) {
|
||||
|
|
|
@ -72,6 +72,11 @@ module RequestForgery {
|
|||
succ = url and
|
||||
pred = url.getArgument(0)
|
||||
)
|
||||
or
|
||||
exists(HtmlSanitizerCall call |
|
||||
pred = call.getInput() and
|
||||
succ = call
|
||||
)
|
||||
}
|
||||
|
||||
private class SinkFromModel extends Sink {
|
||||
|
|
|
@ -35,6 +35,13 @@ class Configuration extends TaintTracking::Configuration {
|
|||
guard instanceof LocalUrlSanitizingGuard or
|
||||
guard instanceof HostnameSanitizerGuard
|
||||
}
|
||||
|
||||
override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(HtmlSanitizerCall call |
|
||||
pred = call.getInput() and
|
||||
succ = call
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -841,6 +841,12 @@ module TaintedPath {
|
|||
dst = call and
|
||||
srclabel = dstlabel
|
||||
)
|
||||
or
|
||||
exists(HtmlSanitizerCall call |
|
||||
src = call.getInput() and
|
||||
dst = call and
|
||||
srclabel = dstlabel
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче