Skip to content

Commit 3c8182b

Browse files
committed
Format and reorder
1 parent 9e38e8d commit 3c8182b

2 files changed

Lines changed: 24 additions & 24 deletions

File tree

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,6 @@ module IntegerParser {
9696

9797
/** Provides models of commonly used functions in the `net/url` package. */
9898
module Url {
99-
/** A method that returns a part of a URL. */
100-
class UrlGetter extends Method {
101-
UrlGetter() {
102-
exists(string m | this.hasQualifiedName("net/url", "URL", m) |
103-
m = ["EscapedPath", "Hostname", "Port", "Query", "RequestURI"]
104-
)
105-
}
106-
}
107-
10899
// These are expressed using TaintTracking::FunctionModel because varargs functions don't work with Models-as-Data sumamries yet.
109100
/** The `JoinPath` function. */
110101
class JoinPath extends TaintTracking::FunctionModel {
@@ -124,6 +115,15 @@ module Url {
124115
outp.isResult(0)
125116
}
126117
}
118+
119+
/** A method that returns a part of a URL. */
120+
class UrlGetter extends Method {
121+
UrlGetter() {
122+
exists(string m | this.hasQualifiedName("net/url", "URL", m) |
123+
m = ["EscapedPath", "Hostname", "Port", "Query", "RequestURI"]
124+
)
125+
}
126+
}
127127
}
128128

129129
/** DEPRECATED: Alias for Url */

go/ql/lib/semmle/go/frameworks/stdlib/Unsafe.qll

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
* Provides classes modeling security-relevant aspects of the `unsafe` package.
33
*/
44

5-
import go
5+
import go
66

7-
/** Provides models of commonly used functions in the `unsafe` package. */
8-
module Unsafe {
9-
private class FunctionModels extends TaintTracking::FunctionModel {
10-
FunctionInput inp;
11-
FunctionOutput outp;
7+
/** Provides models of commonly used functions in the `unsafe` package. */
8+
module Unsafe {
9+
private class FunctionModels extends TaintTracking::FunctionModel {
10+
FunctionInput inp;
11+
FunctionOutput outp;
1212

13-
FunctionModels() {
14-
hasQualifiedName("unsafe", ["String", "StringData", "Slice", "SliceData"]) and
15-
(inp.isParameter(0) and outp.isResult())
16-
}
13+
FunctionModels() {
14+
hasQualifiedName("unsafe", ["String", "StringData", "Slice", "SliceData"]) and
15+
(inp.isParameter(0) and outp.isResult())
16+
}
1717

18-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
19-
input = inp and output = outp
20-
}
21-
}
22-
}
18+
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
19+
input = inp and output = outp
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)