@@ -98,26 +98,39 @@ class ExternalApiDataNode extends DataFlow::Node {
9898/** DEPRECATED: Alias for ExternalApiDataNode */
9999deprecated class ExternalAPIDataNode = ExternalApiDataNode ;
100100
101- /** A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s. */
102- class UntrustedDataToExternalApiConfig extends TaintTracking:: Configuration {
101+ /**
102+ * DEPRECATED: Use `UntrustedDataToExternalApiFlow` instead.
103+ *
104+ * A configuration for tracking flow from `RemoteFlowSource`s to `ExternalApiDataNode`s.
105+ */
106+ deprecated class UntrustedDataToExternalApiConfig extends TaintTracking:: Configuration {
103107 UntrustedDataToExternalApiConfig ( ) { this = "UntrustedDataToExternalAPIConfig" }
104108
105109 override predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
106110
107111 override predicate isSink ( DataFlow:: Node sink ) { sink instanceof ExternalApiDataNode }
108112}
109113
114+ private module UntrustedDataToExternalApiConfig implements DataFlow:: ConfigSig {
115+ predicate isSource ( DataFlow:: Node source ) { source instanceof RemoteFlowSource }
116+
117+ predicate isSink ( DataFlow:: Node sink ) { sink instanceof ExternalApiDataNode }
118+ }
119+
120+ /**
121+ * Tracks flow from untrusted data to external APIs.
122+ */
123+ module UntrustedDataToExternalApiFlow = TaintTracking:: Global< UntrustedDataToExternalApiConfig > ;
124+
110125/** DEPRECATED: Alias for UntrustedDataToExternalApiConfig */
111126deprecated class UntrustedDataToExternalAPIConfig = UntrustedDataToExternalApiConfig ;
112127
113128/** A node representing untrusted data being passed to an external API. */
114129class UntrustedExternalApiDataNode extends ExternalApiDataNode {
115- UntrustedExternalApiDataNode ( ) { any ( UntrustedDataToExternalApiConfig c ) . hasFlow ( _, this ) }
130+ UntrustedExternalApiDataNode ( ) { UntrustedDataToExternalApiFlow :: flow ( _, this ) }
116131
117132 /** Gets a source of untrusted data which is passed to this external API data node. */
118- DataFlow:: Node getAnUntrustedSource ( ) {
119- any ( UntrustedDataToExternalApiConfig c ) .hasFlow ( result , this )
120- }
133+ DataFlow:: Node getAnUntrustedSource ( ) { UntrustedDataToExternalApiFlow:: flow ( result , this ) }
121134}
122135
123136/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
0 commit comments