mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
JS: Autoformat
This commit is contained in:
@@ -669,10 +669,9 @@ private predicate exploratoryFlowStep(
|
||||
private predicate isSource(DataFlow::Node nd, DataFlow::Configuration cfg, FlowLabel lbl) {
|
||||
(cfg.isSource(nd) or nd.(AdditionalSource).isSourceFor(cfg)) and
|
||||
(
|
||||
if cfg instanceof TaintTracking::Configuration then
|
||||
lbl = FlowLabel::taint()
|
||||
else
|
||||
lbl = FlowLabel::data()
|
||||
if cfg instanceof TaintTracking::Configuration
|
||||
then lbl = FlowLabel::taint()
|
||||
else lbl = FlowLabel::data()
|
||||
)
|
||||
or
|
||||
nd.(AdditionalSource).isSourceFor(cfg, lbl)
|
||||
@@ -686,10 +685,9 @@ private predicate isSource(DataFlow::Node nd, DataFlow::Configuration cfg, FlowL
|
||||
private predicate isSink(DataFlow::Node nd, DataFlow::Configuration cfg, FlowLabel lbl) {
|
||||
(cfg.isSink(nd) or nd.(AdditionalSink).isSinkFor(cfg)) and
|
||||
(
|
||||
if cfg instanceof TaintTracking::Configuration then
|
||||
lbl = FlowLabel::taint()
|
||||
else
|
||||
lbl = FlowLabel::data()
|
||||
if cfg instanceof TaintTracking::Configuration
|
||||
then lbl = FlowLabel::taint()
|
||||
else lbl = FlowLabel::data()
|
||||
)
|
||||
or
|
||||
nd.(AdditionalSink).isSinkFor(cfg, lbl)
|
||||
|
||||
@@ -107,8 +107,8 @@ module TaintTracking {
|
||||
}
|
||||
|
||||
override predicate isBarrier(DataFlow::Node node) {
|
||||
super.isBarrier(node) or
|
||||
|
||||
super.isBarrier(node)
|
||||
or
|
||||
// For variable accesses we block both the data and taint label, as a falsy value
|
||||
// can't be an object, and thus can't have any tainted properties.
|
||||
node instanceof DataFlow::VarAccessBarrier
|
||||
@@ -117,8 +117,10 @@ module TaintTracking {
|
||||
final override predicate isBarrierEdge(
|
||||
DataFlow::Node source, DataFlow::Node sink, DataFlow::FlowLabel lbl
|
||||
) {
|
||||
super.isBarrierEdge(source, sink, lbl) or
|
||||
isSanitizerEdge(source, sink, lbl) or
|
||||
super.isBarrierEdge(source, sink, lbl)
|
||||
or
|
||||
isSanitizerEdge(source, sink, lbl)
|
||||
or
|
||||
isSanitizerEdge(source, sink) and lbl.isTaint()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user