Skip to content

Commit b10ade1

Browse files
committed
Update HeaderDeclaration input naming
1 parent 017a778 commit b10ade1

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

python/ql/src/experimental/semmle/python/Concepts.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ module HeaderDeclaration {
159159
/**
160160
* Gets the argument containing the header value.
161161
*/
162-
abstract DataFlow::Node getHeaderInput();
162+
abstract DataFlow::Node getAnInput();
163163
}
164164
}
165165

@@ -177,5 +177,5 @@ class HeaderDeclaration extends DataFlow::Node {
177177
/**
178178
* Gets the argument containing the header value.
179179
*/
180-
DataFlow::Node getHeaderInput() { result = range.getHeaderInput() }
180+
DataFlow::Node getAnInput() { result = range.getAnInput() }
181181
}

python/ql/src/experimental/semmle/python/frameworks/Django.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private module PrivateDjango {
5656
class DjangoResponseSetItemCall extends DataFlow::CallCfgNode, HeaderDeclaration::Range {
5757
DjangoResponseSetItemCall() { this.getFunction() = headerSetItemCall() }
5858

59-
override DataFlow::Node getHeaderInput() { result = this.getArg([0, 1]) }
59+
override DataFlow::Node getAnInput() { result = this.getArg([0, 1]) }
6060
}
6161

6262
class DjangoResponseDefinition extends DataFlow::Node, HeaderDeclaration::Range {
@@ -67,7 +67,7 @@ private module PrivateDjango {
6767
headerInput.asCfgNode() = this.asCfgNode().(DefinitionNode).getValue()
6868
}
6969

70-
override DataFlow::Node getHeaderInput() {
70+
override DataFlow::Node getAnInput() {
7171
result.asExpr() in [headerInput.asExpr(), this.asExpr().(Subscript).getIndex()]
7272
}
7373
}

python/ql/src/experimental/semmle/python/frameworks/Flask.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ module ExperimentalFlask {
5454
headerInput.asCfgNode() = this.asCfgNode().(DefinitionNode).getValue()
5555
}
5656

57-
override DataFlow::Node getHeaderInput() {
57+
override DataFlow::Node getAnInput() {
5858
result.asExpr() in [headerInput.asExpr(), this.asExpr().(Subscript).getIndex()]
5959
}
6060
}
6161

6262
private class FlaskMakeResponseExtend extends DataFlow::CallCfgNode, HeaderDeclaration::Range {
6363
FlaskMakeResponseExtend() { this.getFunction() = headerInstanceCall() }
6464

65-
override DataFlow::Node getHeaderInput() { result = this.getArg(_) }
65+
override DataFlow::Node getAnInput() { result = this.getArg(_) }
6666
}
6767

6868
private class FlaskResponse extends DataFlow::CallCfgNode, HeaderDeclaration::Range {
6969
FlaskResponse() { this = Flask::Response::classRef().getACall() }
7070

71-
override DataFlow::Node getHeaderInput() { result = this.getArgByName("headers") }
71+
override DataFlow::Node getAnInput() { result = this.getArgByName("headers") }
7272
}
7373
}

python/ql/src/experimental/semmle/python/frameworks/Werkzeug.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private module Werkzeug {
2424
this.getFunction().(DataFlow::AttrRead).getAttributeName() = "add"
2525
}
2626

27-
override DataFlow::Node getHeaderInput() { result = this.getArg(_) }
27+
override DataFlow::Node getAnInput() { result = this.getArg(_) }
2828
}
2929
}
3030
}

python/ql/src/experimental/semmle/python/security/injection/HTTPHeaders.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ class HeaderInjectionFlowConfig extends TaintTracking::Configuration {
1313
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1414

1515
override predicate isSink(DataFlow::Node sink) {
16-
sink = any(HeaderDeclaration headerDeclaration).getHeaderInput()
16+
sink = any(HeaderDeclaration headerDeclaration).getAnInput()
1717
}
1818
}

0 commit comments

Comments
 (0)