Skip to content

Commit c3169d2

Browse files
committed
Convert Fasthttp::Args::RemoteFlowSource to MaD
1 parent 5a00b5e commit c3169d2

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ extensions:
1313
pack: codeql/go-all
1414
extensible: sourceModel
1515
data:
16+
- ["github.com/valyala/fasthttp", "Args", True, "Peek", "", "", "ReturnValue[0]", "remote", "manual"]
17+
- ["github.com/valyala/fasthttp", "Args", True, "PeekBytes", "", "", "ReturnValue[0]", "remote", "manual"]
18+
- ["github.com/valyala/fasthttp", "Args", True, "PeekMulti", "", "", "ReturnValue[0]", "remote", "manual"]
19+
- ["github.com/valyala/fasthttp", "Args", True, "PeekMultiBytes", "", "", "ReturnValue[0]", "remote", "manual"]
20+
- ["github.com/valyala/fasthttp", "Args", True, "QueryString", "", "", "ReturnValue[0]", "remote", "manual"]
21+
- ["github.com/valyala/fasthttp", "Args", True, "String", "", "", "ReturnValue[0]", "remote", "manual"]
1622
- ["github.com/valyala/fasthttp", "URI", True, "FullURI", "", "", "ReturnValue[0]", "remote", "manual"]
1723
- ["github.com/valyala/fasthttp", "URI", True, "LastPathSegment", "", "", "ReturnValue[0]", "remote", "manual"]
1824
- ["github.com/valyala/fasthttp", "URI", True, "Path", "", "", "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
@@ -279,20 +279,24 @@ module Fasthttp {
279279
}
280280

281281
/**
282+
* DEPRECATED
283+
*
282284
* Provide modeling for fasthttp.Args Type.
283285
*/
284-
module Args {
286+
deprecated module Args {
285287
/**
286-
* DEPRECATED: Use `RemoteFlowSource` instead.
288+
* DEPRECATED: Use `RemoteFlowSource::Range` instead.
287289
*/
288290
deprecated class UntrustedFlowSource = RemoteFlowSource;
289291

290292
/**
293+
* DEPRECATED: Use `RemoteFlowSource::Range` instead.
294+
*
291295
* The methods as Remote user controllable source which are part of the incoming URL Parameters.
292296
*
293297
* When support for lambdas has been implemented we should model "VisitAll".
294298
*/
295-
class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
299+
deprecated class RemoteFlowSource extends RemoteFlowSource::Range instanceof DataFlow::Node {
296300
RemoteFlowSource() {
297301
exists(Method m |
298302
m.hasQualifiedName(packagePath(), "Args",

0 commit comments

Comments
 (0)