JavaScript: Make flow summaries work for non-taint configurations.

With flow labels it often makes more sense to use a `DataFlow::Configuration` rather than a `TaintTracking::Configuration`, so flow summaries should support both.
This commit is contained in:
Max Schaefer
2019-08-02 11:16:12 +01:00
parent d83faaf714
commit e06ed503ec
4 changed files with 4 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ import Configurations
import PortalExitSource
import SinkFromAnnotation
from TaintTracking::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink, Portal p
from DataFlow::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink, Portal p
where
cfg.hasFlowPath(source, sink) and
p = source.getNode().(PortalExitSource).getPortal() and

View File

@@ -11,7 +11,7 @@ import Configurations
import PortalEntrySink
import SourceFromAnnotation
from TaintTracking::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink, Portal p
from DataFlow::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink, Portal p
where
cfg.hasFlowPath(source, sink) and
p = sink.getNode().(PortalEntrySink).getPortal() and

View File

@@ -11,8 +11,7 @@ class PortalEntrySink extends DataFlow::AdditionalSink {
PortalEntrySink() { this = p.getAnEntryNode(true) }
override predicate isSinkFor(DataFlow::Configuration cfg, DataFlow::FlowLabel lbl) {
cfg instanceof TaintTracking::Configuration and
lbl = any(DataFlow::FlowLabel l)
any()
}
/** Gets the portal of which this is an entry node. */

View File

@@ -11,8 +11,7 @@ class PortalExitSource extends DataFlow::AdditionalSource {
PortalExitSource() { this = p.getAnExitNode(true) }
override predicate isSourceFor(DataFlow::Configuration cfg, DataFlow::FlowLabel lbl) {
cfg instanceof TaintTracking::Configuration and
lbl = any(DataFlow::FlowLabel l)
any()
}
/** Gets the portal of which this is an exit node. */