@@ -90,26 +90,38 @@ class ExternalApiDataNode extends DataFlow::Node {
9090/** DEPRECATED: Alias for ExternalApiDataNode */
9191deprecated class ExternalAPIDataNode = ExternalApiDataNode ;
9292
93- /** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */
94- class UntrustedDataToExternalApiConfig extends TaintTracking:: Configuration {
93+ /**
94+ * DEPRECATED: Use `RemoteSourceToExternalApi` instead.
95+ *
96+ * A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s.
97+ */
98+ deprecated class UntrustedDataToExternalApiConfig extends TaintTracking:: Configuration {
9599 UntrustedDataToExternalApiConfig ( ) { this = "UntrustedDataToExternalAPIConfig" }
96100
97101 override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
98102
99103 override predicate isSink ( DataFlow:: Node sink ) { sink instanceof ExternalApiDataNode }
100104}
101105
106+ /** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */
107+ private module RemoteSourceToExternalApiConfig implements DataFlow:: ConfigSig {
108+ predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
109+
110+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof ExternalApiDataNode }
111+ }
112+
113+ /** A module for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */
114+ module RemoteSourceToExternalApi = TaintTracking:: Global< RemoteSourceToExternalApiConfig > ;
115+
102116/** DEPRECATED: Alias for UntrustedDataToExternalApiConfig */
103117deprecated class UntrustedDataToExternalAPIConfig = UntrustedDataToExternalApiConfig ;
104118
105119/** A node representing untrusted data being passed to an external API. */
106120class UntrustedExternalApiDataNode extends ExternalApiDataNode {
107- private UntrustedDataToExternalApiConfig c ;
108-
109- UntrustedExternalApiDataNode ( ) { c .hasFlow ( _, this ) }
121+ UntrustedExternalApiDataNode ( ) { RemoteSourceToExternalApi:: flow ( _, this ) }
110122
111123 /** Gets a source of untrusted data which is passed to this external API data node. */
112- DataFlow:: Node getAnUntrustedSource ( ) { c . hasFlow ( result , this ) }
124+ DataFlow:: Node getAnUntrustedSource ( ) { RemoteSourceToExternalApi :: flow ( result , this ) }
113125}
114126
115127/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
0 commit comments