Skip to content

Commit 7a54755

Browse files
Alvaro Muñozowen-mc
andauthored
Apply suggestions from code review
Co-authored-by: Owen Mansel-Chan <[email protected]>
1 parent 1b6308e commit 7a54755

File tree

1 file changed

+16
-2
lines changed
  • go/ql/test/library-tests/semmle/go/frameworks/gqlgen

1 file changed

+16
-2
lines changed
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
import go
2+
import TestUtilities.InlineExpectationsTest
23

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

0 commit comments

Comments
 (0)