Skip to content

Commit 5a00b5e

Browse files
committed
Convert Fasthttp::URI::RemoteFlowSource to MaD
1 parent f339274 commit 5a00b5e

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

go/ql/lib/ext/github.com.valyala.fasthttp.model.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ extensions:
88
- ["github.com/valyala/fasthttp", "URI", False, "Update", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]
99
- ["github.com/valyala/fasthttp", "URI", False, "UpdateBytes", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]
1010
- ["github.com/valyala/fasthttp", "URI", False, "Parse", "", "", "Argument[0..1]", "Argument[receiver]", "taint", "manual"]
11+
12+
- addsTo:
13+
pack: codeql/go-all
14+
extensible: sourceModel
15+
data:
16+
- ["github.com/valyala/fasthttp", "URI", True, "FullURI", "", "", "ReturnValue[0]", "remote", "manual"]
17+
- ["github.com/valyala/fasthttp", "URI", True, "LastPathSegment", "", "", "ReturnValue[0]", "remote", "manual"]
18+
- ["github.com/valyala/fasthttp", "URI", True, "Path", "", "", "ReturnValue[0]", "remote", "manual"]
19+
- ["github.com/valyala/fasthttp", "URI", True, "PathOriginal", "", "", "ReturnValue[0]", "remote", "manual"]
20+
- ["github.com/valyala/fasthttp", "URI", True, "QueryString", "", "", "ReturnValue[0]", "remote", "manual"]
21+
- ["github.com/valyala/fasthttp", "URI", True, "String", "", "", "ReturnValue[0]", "remote", "manual"]

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,18 +252,22 @@ module Fasthttp {
252252
}
253253

254254
/**
255+
* DEPRECATED
256+
*
255257
* Provide modeling for fasthttp.URI Type.
256258
*/
257-
module URI {
259+
deprecated module URI {
258260
/**
259-
* DEPRECATED: Use `RemoteFlowSource` instead.
261+
* DEPRECATED: Use `RemoteFlowSource::Range` instead.
260262
*/
261263
deprecated class UntrustedFlowSource = RemoteFlowSource;
262264

263265
/**
266+
* DEPRECATED: Use `RemoteFlowSource::Range` instead.
267+
*
264268
* The methods as Remote user controllable source which are part of the incoming URL.
265269
*/
266-
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
270+
deprecated class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
267271
RemoteFlowSource() {
268272
exists(Method m |
269273
m.hasQualifiedName(packagePath(), "URI",

0 commit comments

Comments
 (0)