mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Python: Fix up some typos for bottle and add a few more tests.
This commit is contained in:
@@ -2,12 +2,12 @@ import python
|
||||
import semmle.python.web.Http
|
||||
import semmle.python.types.Extensions
|
||||
|
||||
/** The flask module */
|
||||
/** The bottle module */
|
||||
ModuleObject theBottleModule() {
|
||||
result = ModuleObject::named("bottle")
|
||||
}
|
||||
|
||||
/** The flask app class */
|
||||
/** The bottle.Bottle class */
|
||||
ClassObject theBottleClass() {
|
||||
result = ModuleObject::named("bottle").getAttribute("Bottle")
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import semmle.python.web.Http
|
||||
import semmle.python.web.bottle.General
|
||||
|
||||
|
||||
/** A django.http.response.Response object
|
||||
/** A bottle.Response object
|
||||
* This isn't really a "taint", but we use the value tracking machinery to
|
||||
* track the flow of response objects.
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ class BottleResponse extends TaintKind {
|
||||
}
|
||||
|
||||
private Object theBottleResponseObject() {
|
||||
result = theBottleModule().getAttribute("request")
|
||||
result = theBottleModule().getAttribute("response")
|
||||
}
|
||||
|
||||
class BottleResponseBodyAssignment extends TaintSink {
|
||||
@@ -32,7 +32,7 @@ class BottleResponseBodyAssignment extends TaintSink {
|
||||
}
|
||||
|
||||
override predicate sinks(TaintKind kind) {
|
||||
kind instanceof StringKind
|
||||
kind instanceof UntrustedStringKind
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user