Skip to content

Commit bd2564e

Browse files
committed
Formatting
1 parent 581e7f5 commit bd2564e

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

python/ql/lib/change-notes/2024-08-30-bottle-tornado.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: majorAnalysis
3+
---
4+
* Added modeling of the `bottle` framework, leading to new remote flow sources and header writes

python/ql/lib/semmle/python/frameworks/Bottle.qll

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
private import python
77
private import semmle.python.Concepts
8-
private import semmle.python.dataflow.new.DataFlow
98
private import semmle.python.ApiGraphs
109
private import semmle.python.dataflow.new.RemoteFlowSources
1110
private import semmle.python.frameworks.internal.InstanceTaintStepsHelper
@@ -17,14 +16,18 @@ private import semmle.python.frameworks.internal.InstanceTaintStepsHelper
1716
* See https://bottlepy.org/docs/dev/.
1817
*/
1918
module Bottle {
20-
module BottleModule {
21-
API::Node bottle() { result = API::moduleImport("bottle") }
19+
/** Gets a reference to the `bottle` module. */
20+
API::Node bottle() { result = API::moduleImport("bottle") }
2221

22+
/** Provides models for the `bottle` module. */
23+
module BottleModule {
24+
/** Provides models for the `bottle.response` module */
2325
module Response {
26+
/** Gets a reference to the `bottle.response` module. */
2427
API::Node response() { result = bottle().getMember("response") }
2528

2629
/**
27-
* A call to the `bottle.web.RequestHandler.set_header` or `bottle.web.RequestHandler.add_header` method.
30+
* A call to the `bottle.BaseResponse.set_header` or `bottle.BaseResponse.add_header` method.
2831
*
2932
* See https://bottlepy.org/docs/dev/api.html#bottle.BaseResponse.set_header
3033
*/
@@ -48,7 +51,9 @@ module Bottle {
4851
override predicate valueAllowsNewline() { none() }
4952
}
5053

54+
/** Provides models for the `bottle.request` module */
5155
module Request {
56+
/** Gets a reference to the `bottle.request` module. */
5257
API::Node request() { result = bottle().getMember("request") }
5358

5459
private class Request extends RemoteFlowSource::Range {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import python
2-
import experimental.meta.ConceptsTest
2+
import experimental.meta.ConceptsTest

0 commit comments

Comments
 (0)