Skip to content

Commit 3926fd7

Browse files
committed
update tests
1 parent 8ef969f commit 3926fd7

File tree

4 files changed

+142
-186
lines changed

4 files changed

+142
-186
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module Fasthttp {
131131
* So if we called a method like `URIInstance.SetHost(pred)` then the URIInstance is succ.
132132
*/
133133
class UriAdditionalStep extends AdditionalStep {
134-
UriAdditionalStep() { this = "URI additioanl steps" }
134+
UriAdditionalStep() { this = "URI additional steps" }
135135

136136
override predicate hasTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
137137
exists(DataFlow::MethodCallNode m, DataFlow::Variable frn |
@@ -367,7 +367,7 @@ module Fasthttp {
367367
* for SetURI the argument type is fasthttp.URI which is already modeled, look at URI module.
368368
*/
369369
class RequestAdditionalStep extends AdditionalStep {
370-
RequestAdditionalStep() { this = "Request additioanl steps" }
370+
RequestAdditionalStep() { this = "Request additional steps" }
371371

372372
override predicate hasTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
373373
exists(DataFlow::MethodCallNode m, DataFlow::Variable frn |

go/ql/test/library-tests/semmle/go/frameworks/Fasthttp/UntrustedRemoteFlowSource.expected

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
import go
2+
import TestUtilities.InlineExpectationsTest
23

3-
select any(UntrustedFlowSource s)
4+
module FasthttpTest implements TestSig {
5+
string getARelevantTag() { result = "UntrustedFlowSource" }
6+
7+
predicate hasActualResult(Location location, string element, string tag, string value) {
8+
exists(UntrustedFlowSource q |
9+
q.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
10+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
11+
element = q.toString() and
12+
value = q.toString() and
13+
tag = "UntrustedFlowSource"
14+
)
15+
}
16+
}
17+
18+
import MakeTest<FasthttpTest>

0 commit comments

Comments
 (0)