@@ -87,3 +87,70 @@ module Cryptography {
8787 predicate isWeak ( ) { this = "ECB" }
8888 }
8989}
90+
91+ /** Provides classes for modeling HTTP-related APIs. */
92+ module Http {
93+ /** Provides classes for modeling HTTP clients. */
94+ module Client {
95+ /**
96+ * A data-flow node that makes an outgoing HTTP request.
97+ *
98+ * Extend this class to refine existing API models. If you want to model new APIs,
99+ * extend `Http::Client::Request::Range` instead.
100+ */
101+ class Request extends DataFlow:: Node instanceof Request:: Range {
102+ /**
103+ * Gets a data-flow node that contributes to the URL of the request.
104+ * Depending on the framework, a request may have multiple nodes which contribute to the URL.
105+ */
106+ DataFlow:: Node getAUrlPart ( ) { result = super .getAUrlPart ( ) }
107+
108+ /** Gets a string that identifies the framework used for this request. */
109+ string getFramework ( ) { result = super .getFramework ( ) }
110+
111+ /**
112+ * Holds if this request is made using a mode that disables SSL/TLS
113+ * certificate validation, where `disablingNode` represents the point at
114+ * which the validation was disabled, and `argumentOrigin` represents the origin
115+ * of the argument that disabled the validation (which could be the same node as
116+ * `disablingNode`).
117+ */
118+ predicate disablesCertificateValidation (
119+ DataFlow:: Node disablingNode , DataFlow:: Node argumentOrigin
120+ ) {
121+ super .disablesCertificateValidation ( disablingNode , argumentOrigin )
122+ }
123+ }
124+
125+ /** Provides a class for modeling new HTTP requests. */
126+ module Request {
127+ /**
128+ * A data-flow node that makes an outgoing HTTP request.
129+ *
130+ * Extend this class to model new APIs. If you want to refine existing API models,
131+ * extend `Http::Client::Request` instead.
132+ */
133+ abstract class Range extends DataFlow:: Node {
134+ /**
135+ * Gets a data-flow node that contributes to the URL of the request.
136+ * Depending on the framework, a request may have multiple nodes which contribute to the URL.
137+ */
138+ abstract DataFlow:: Node getAUrlPart ( ) ;
139+
140+ /** Gets a string that identifies the framework used for this request. */
141+ abstract string getFramework ( ) ;
142+
143+ /**
144+ * Holds if this request is made using a mode that disables SSL/TLS
145+ * certificate validation, where `disablingNode` represents the point at
146+ * which the validation was disabled, and `argumentOrigin` represents the origin
147+ * of the argument that disabled the validation (which could be the same node as
148+ * `disablingNode`).
149+ */
150+ abstract predicate disablesCertificateValidation (
151+ DataFlow:: Node disablingNode , DataFlow:: Node argumentOrigin
152+ ) ;
153+ }
154+ }
155+ }
156+ }
0 commit comments