Skip to content

Commit a9d9e8c

Browse files
committed
JS: Update Restify2 test
1 parent b7030b6 commit a9d9e8c

File tree

1 file changed

+4
-12
lines changed
  • javascript/ql/test/library-tests/frameworks/Restify2

1 file changed

+4
-12
lines changed

javascript/ql/test/library-tests/frameworks/Restify2/tests.ql

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ query predicate passingPositiveTests(string res, string expectation, InlineTest
5757
exists(ReflectedXss::Sink n | t.inNode(n))
5858
or
5959
expectation = "xss" and
60-
exists(XssConfig::Configuration cfg, DataFlow::Node sink |
61-
cfg.hasFlow(_, sink) and t.inNode(sink)
62-
)
60+
exists(DataFlow::Node sink | XssConfig::ReflectedXssFlow::flowTo(sink) and t.inNode(sink))
6361
or
6462
expectation = "cleartextStorageSink" and
6563
exists(CleartextStorage::Sink n | t.inNode(n))
@@ -107,9 +105,7 @@ query predicate failingPositiveTests(string res, string expectation, InlineTest
107105
not exists(ReflectedXss::Sink n | t.inNode(n))
108106
or
109107
expectation = "xss" and
110-
not exists(XssConfig::Configuration cfg, DataFlow::Node sink |
111-
cfg.hasFlow(_, sink) and t.inNode(sink)
112-
)
108+
not exists(DataFlow::Node sink | XssConfig::ReflectedXssFlow::flowTo(sink) and t.inNode(sink))
113109
or
114110
expectation = "cleartextStorageSink" and
115111
not exists(CleartextStorage::Sink n | t.inNode(n))
@@ -157,9 +153,7 @@ query predicate passingNegativeTests(string res, string expectation, InlineTest
157153
not exists(ReflectedXss::Sink n | t.inNode(n))
158154
or
159155
expectation = "!xss" and
160-
not exists(XssConfig::Configuration cfg, DataFlow::Node sink |
161-
cfg.hasFlow(_, sink) and t.inNode(sink)
162-
)
156+
not exists(DataFlow::Node sink | XssConfig::ReflectedXssFlow::flowTo(sink) and t.inNode(sink))
163157
or
164158
expectation = "!cleartextStorageSink" and
165159
not exists(CleartextStorage::Sink n | t.inNode(n))
@@ -207,9 +201,7 @@ query predicate failingNegativeTests(string res, string expectation, InlineTest
207201
exists(ReflectedXss::Sink n | t.inNode(n))
208202
or
209203
expectation = "!xss" and
210-
exists(XssConfig::Configuration cfg, DataFlow::Node sink |
211-
cfg.hasFlow(_, sink) and t.inNode(sink)
212-
)
204+
exists(DataFlow::Node sink | XssConfig::ReflectedXssFlow::flowTo(sink) and t.inNode(sink))
213205
or
214206
expectation = "!cleartextStorageSink" and
215207
exists(CleartextStorage::Sink n | t.inNode(n))

0 commit comments

Comments
 (0)