Skip to content

Commit 5fba989

Browse files
committed
Rename UntrustedFlowSource to RemoteFlowSource
Only the whole word. Skipped one instance in an old change note.
1 parent da3fa22 commit 5fba989

File tree

61 files changed

+171
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+171
-175
lines changed

docs/codeql/codeql-language-guides/modeling-data-flow-in-go-libraries.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Sources
1515
-------
1616

1717
To mark a source of data that is controlled by an untrusted user, we
18-
create a class extending ``UntrustedFlowSource::Range``. Inheritance and
18+
create a class extending ``RemoteFlowSource::Range``. Inheritance and
1919
the characteristic predicate of the class should be used to specify
2020
exactly the dataflow node that introduces the data. Here is a short
2121
example from ``Mux.qll``.
2222

2323
.. code-block:: ql
2424
25-
class RequestVars extends DataFlow::UntrustedFlowSource::Range, DataFlow::CallNode {
25+
class RequestVars extends DataFlow::RemoteFlowSource::Range, DataFlow::CallNode {
2626
RequestVars() { this.getTarget().hasQualifiedName("github.com/gorilla/mux", "Vars") }
2727
}
2828

go/docs/language/learn-ql/go/library-modeling-go.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Sources
1313
-------
1414

1515
To mark a source of data that is controlled by an untrusted user, we
16-
create a class extending ``UntrustedFlowSource::Range``. Inheritance and
16+
create a class extending ``RemoteFlowSource::Range``. Inheritance and
1717
the characteristic predicate of the class should be used to specify
1818
exactly the dataflow node that introduces the data. Here is a short
1919
example from ``Mux.qll``.
2020

2121
.. code-block:: ql
2222
23-
class RequestVars extends DataFlow::UntrustedFlowSource::Range, DataFlow::CallNode {
23+
class RequestVars extends DataFlow::RemoteFlowSource::Range, DataFlow::CallNode {
2424
RequestVars() { this.getTarget().hasQualifiedName("github.com/gorilla/mux", "Vars") }
2525
}
2626
@@ -119,4 +119,4 @@ Here is a short example from ``Stdlib.qll``, which has been slightly simplified.
119119
This has the effect that any call to ``Print``, ``Printf``, or
120120
``Println`` in the package ``fmt`` is recognized as a logger call.
121121
Any query that uses logger calls as a sink will then identify when tainted data
122-
has been passed as an argument to ``Print``, ``Printf``, or ``Println``.
122+
has been passed as an argument to ``Print``, ``Printf``, or ``Println``.

go/ql/lib/semmle/go/frameworks/AwsLambda.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import go
77

88
/** A source of input data in an AWS Lambda. */
9-
private class LambdaInput extends UntrustedFlowSource::Range {
9+
private class LambdaInput extends RemoteFlowSource::Range {
1010
LambdaInput() {
1111
exists(Parameter p | p = this.asParameter() |
1212
p = any(HandlerFunction hf).getAParameter() and

go/ql/lib/semmle/go/frameworks/Beego.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module Beego {
5050
/**
5151
* `BeegoInput` sources of untrusted data.
5252
*/
53-
private class BeegoInputSource extends UntrustedFlowSource::Range {
53+
private class BeegoInputSource extends RemoteFlowSource::Range {
5454
string methodName;
5555

5656
BeegoInputSource() {
@@ -81,7 +81,7 @@ module Beego {
8181
/**
8282
* `beego.Controller` sources of untrusted data.
8383
*/
84-
private class BeegoControllerSource extends UntrustedFlowSource::Range {
84+
private class BeegoControllerSource extends RemoteFlowSource::Range {
8585
BeegoControllerSource() {
8686
exists(string methodName, FunctionOutput output |
8787
methodName = "ParseForm" and
@@ -105,7 +105,7 @@ module Beego {
105105
/**
106106
* `BeegoInputRequestBody` sources of untrusted data.
107107
*/
108-
private class BeegoInputRequestBodySource extends UntrustedFlowSource::Range {
108+
private class BeegoInputRequestBodySource extends RemoteFlowSource::Range {
109109
BeegoInputRequestBodySource() {
110110
exists(DataFlow::FieldReadNode frn | this = frn |
111111
frn.getField().hasQualifiedName(contextPackagePath(), "BeegoInput", "RequestBody")
@@ -116,7 +116,7 @@ module Beego {
116116
/**
117117
* `beego/context.Context` sources of untrusted data.
118118
*/
119-
private class BeegoContextSource extends UntrustedFlowSource::Range {
119+
private class BeegoContextSource extends RemoteFlowSource::Range {
120120
BeegoContextSource() {
121121
exists(Method m | m.hasQualifiedName(contextPackagePath(), "Context", "GetCookie") |
122122
this = m.getACall().getResult()

go/ql/lib/semmle/go/frameworks/Chi.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private module Chi {
1111
/**
1212
* Functions that extract URL parameters, considered as a source of untrusted flow.
1313
*/
14-
private class UserControlledFunction extends UntrustedFlowSource::Range, DataFlow::CallNode {
14+
private class UserControlledFunction extends RemoteFlowSource::Range, DataFlow::CallNode {
1515
UserControlledFunction() {
1616
this.getTarget().hasQualifiedName(packagePath(), ["URLParam", "URLParamFromCtx"])
1717
}
@@ -20,7 +20,7 @@ private module Chi {
2020
/**
2121
* Methods that extract URL parameters, considered as a source of untrusted flow.
2222
*/
23-
private class UserControlledRequestMethod extends UntrustedFlowSource::Range,
23+
private class UserControlledRequestMethod extends RemoteFlowSource::Range,
2424
DataFlow::MethodCallNode
2525
{
2626
UserControlledRequestMethod() {

go/ql/lib/semmle/go/frameworks/Echo.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ private module Echo {
1212
/**
1313
* Data from a `Context` interface method, considered as a source of untrusted flow.
1414
*/
15-
private class EchoContextSource extends UntrustedFlowSource::Range {
15+
private class EchoContextSource extends RemoteFlowSource::Range {
1616
EchoContextSource() {
1717
exists(DataFlow::MethodCallNode call, string methodName |
1818
methodName =
@@ -42,7 +42,7 @@ private module Echo {
4242
/**
4343
* A call to a method on `Context` struct that unmarshals data into a target.
4444
*/
45-
private class EchoContextBinder extends UntrustedFlowSource::Range {
45+
private class EchoContextBinder extends RemoteFlowSource::Range {
4646
EchoContextBinder() {
4747
exists(DataFlow::MethodCallNode call |
4848
call.getTarget().hasQualifiedName(packagePath(), "Context", "Bind")

go/ql/lib/semmle/go/frameworks/ElazarlGoproxy.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module ElazarlGoproxy {
9595
}
9696
}
9797

98-
private class UserControlledRequestData extends UntrustedFlowSource::Range {
98+
private class UserControlledRequestData extends RemoteFlowSource::Range {
9999
UserControlledRequestData() {
100100
exists(DataFlow::FieldReadNode frn | this = frn |
101101
// liberally consider ProxyCtx.UserData to be untrusted; it's a data field set by a request handler

go/ql/lib/semmle/go/frameworks/Fasthttp.qll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ module Fasthttp {
258258
/**
259259
* The methods as Remote user controllable source which are part of the incoming URL.
260260
*/
261-
class UntrustedFlowSource extends UntrustedFlowSource::Range instanceof DataFlow::Node {
262-
UntrustedFlowSource() {
261+
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
262+
RemoteFlowSource() {
263263
exists(Method m |
264264
m.hasQualifiedName(packagePath(), "URI",
265265
["FullURI", "LastPathSegment", "Path", "PathOriginal", "QueryString", "String"]) and
@@ -278,8 +278,8 @@ module Fasthttp {
278278
*
279279
* When support for lambdas has been implemented we should model "VisitAll".
280280
*/
281-
class UntrustedFlowSource extends UntrustedFlowSource::Range instanceof DataFlow::Node {
282-
UntrustedFlowSource() {
281+
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
282+
RemoteFlowSource() {
283283
exists(Method m |
284284
m.hasQualifiedName(packagePath(), "Args",
285285
["Peek", "PeekBytes", "PeekMulti", "PeekMultiBytes", "QueryString", "String"]) and
@@ -389,8 +389,8 @@ module Fasthttp {
389389
/**
390390
* The methods as Remote user controllable source which can be many part of request.
391391
*/
392-
class UntrustedFlowSource extends UntrustedFlowSource::Range instanceof DataFlow::Node {
393-
UntrustedFlowSource() {
392+
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
393+
RemoteFlowSource() {
394394
exists(Method m |
395395
m.hasQualifiedName(packagePath(), "Request",
396396
[
@@ -468,8 +468,8 @@ module Fasthttp {
468468
*
469469
* When support for lambdas has been implemented we should model "VisitAll", "VisitAllCookie", "VisitAllInOrder", "VisitAllTrailer".
470470
*/
471-
class UntrustedFlowSource extends UntrustedFlowSource::Range instanceof DataFlow::Node {
472-
UntrustedFlowSource() {
471+
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
472+
RemoteFlowSource() {
473473
exists(Method m |
474474
m.hasQualifiedName(packagePath(), "RequestCtx",
475475
[
@@ -491,8 +491,8 @@ module Fasthttp {
491491
*
492492
* When support for lambdas has been implemented we should model "VisitAll", "VisitAllCookie", "VisitAllInOrder", "VisitAllTrailer".
493493
*/
494-
class UntrustedFlowSource extends UntrustedFlowSource::Range instanceof DataFlow::Node {
495-
UntrustedFlowSource() {
494+
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
495+
RemoteFlowSource() {
496496
exists(Method m |
497497
m.hasQualifiedName(packagePath(), "RequestHeader",
498498
[

go/ql/lib/semmle/go/frameworks/Gin.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ private module Gin {
1212
/**
1313
* Data from a `Context` struct, considered as a source of untrusted flow.
1414
*/
15-
private class GithubComGinGonicGinContextSource extends UntrustedFlowSource::Range {
15+
private class GithubComGinGonicGinContextSource extends RemoteFlowSource::Range {
1616
GithubComGinGonicGinContextSource() {
1717
// Method calls:
1818
exists(DataFlow::MethodCallNode call, string methodName |
@@ -39,7 +39,7 @@ private module Gin {
3939
/**
4040
* A call to a method on `Context` struct that unmarshals data into a target.
4141
*/
42-
private class GithubComGinGonicGinContextBindSource extends UntrustedFlowSource::Range {
42+
private class GithubComGinGonicGinContextBindSource extends RemoteFlowSource::Range {
4343
GithubComGinGonicGinContextBindSource() {
4444
exists(DataFlow::MethodCallNode call, string methodName |
4545
call.getTarget().hasQualifiedName(packagePath(), "Context", methodName) and

go/ql/lib/semmle/go/frameworks/GoKit.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module GoKit {
3535
DataFlow::exprNode(result.(FuncLit)) = getAnEndpointFactoryResult()
3636
}
3737

38-
private class EndpointRequest extends UntrustedFlowSource::Range {
38+
private class EndpointRequest extends RemoteFlowSource::Range {
3939
EndpointRequest() { this = DataFlow::parameterNode(getAnEndpointFunction().getParameter(1)) }
4040
}
4141
}

0 commit comments

Comments
 (0)