mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Python: Add Requests response model
This required making some of the relevant bits public, but they are marked as internal anyway.
This commit is contained in:
committed by
Rasmus Wriedt Larsen
parent
cb1efa915e
commit
1d4b4ee740
@@ -12,6 +12,7 @@ private import semmle.python.ApiGraphs
|
||||
private import semmle.python.dataflow.new.TaintTracking
|
||||
private import semmle.python.frameworks.internal.InstanceTaintStepsHelper
|
||||
private import semmle.python.frameworks.Stdlib
|
||||
private import semmle.python.frameworks.data.ModelsAsData
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -22,7 +23,7 @@ private import semmle.python.frameworks.Stdlib
|
||||
* - https://pypi.org/project/requests/
|
||||
* - https://requests.readthedocs.io/en/latest/
|
||||
*/
|
||||
private module Requests {
|
||||
module Requests {
|
||||
/**
|
||||
* An outgoing HTTP request, from the `requests` library.
|
||||
*
|
||||
@@ -91,10 +92,12 @@ private module Requests {
|
||||
*/
|
||||
module Response {
|
||||
/** Gets a reference to the `requests.models.Response` class. */
|
||||
private API::Node classRef() {
|
||||
API::Node classRef() {
|
||||
result = API::moduleImport("requests").getMember("models").getMember("Response")
|
||||
or
|
||||
result = API::moduleImport("requests").getMember("Response")
|
||||
or
|
||||
result = ModelOutput::getATypeNode("requests.models.Response~Subclass").getASubclass*()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user