mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
JS: introduce ClientRequest.getADataNode
This commit is contained in:
@@ -9,6 +9,10 @@ import javascript
|
||||
|
||||
/**
|
||||
* A call that performs a request to a URL.
|
||||
*
|
||||
* Example: An HTTP POST request is client request that sends some
|
||||
* `data` to a `url`, where both the headers and the body of the request
|
||||
* contribute to the `data`.
|
||||
*/
|
||||
abstract class CustomClientRequest extends DataFlow::InvokeNode {
|
||||
|
||||
@@ -16,10 +20,20 @@ abstract class CustomClientRequest extends DataFlow::InvokeNode {
|
||||
* Gets the URL of the request.
|
||||
*/
|
||||
abstract DataFlow::Node getUrl();
|
||||
|
||||
/**
|
||||
* Gets a node that contributes to the data-part this request.
|
||||
*/
|
||||
abstract DataFlow::Node getADataNode();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A call that performs a request to a URL.
|
||||
*
|
||||
* Example: An HTTP POST request is client request that sends some
|
||||
* `data` to a `url`, where both the headers and the body of the request
|
||||
* contribute to the `data`.
|
||||
*/
|
||||
class ClientRequest extends DataFlow::InvokeNode {
|
||||
|
||||
@@ -35,6 +49,14 @@ class ClientRequest extends DataFlow::InvokeNode {
|
||||
DataFlow::Node getUrl() {
|
||||
result = custom.getUrl()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a node that contributes to the data-part this request.
|
||||
*/
|
||||
DataFlow::Node getADataNode() {
|
||||
result = custom.getADataNode()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,6 +105,10 @@ private class RequestUrlRequest extends CustomClientRequest {
|
||||
result = url
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,6 +139,10 @@ private class AxiosUrlRequest extends CustomClientRequest {
|
||||
result = url
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,6 +174,10 @@ private class FetchUrlRequest extends CustomClientRequest {
|
||||
result = url
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,6 +203,10 @@ private class GotUrlRequest extends CustomClientRequest {
|
||||
result = url
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,4 +229,8 @@ private class SuperAgentUrlRequest extends CustomClientRequest {
|
||||
result = url
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,6 +63,10 @@ module Electron {
|
||||
result = getOptionArgument(0, "url")
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,6 +82,10 @@ module Electron {
|
||||
result = getOptionArgument(0, "url")
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -774,6 +774,10 @@ module NodeJSLib {
|
||||
result = url
|
||||
}
|
||||
|
||||
override DataFlow::Node getADataNode() {
|
||||
none()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user