Skip to content

Commit 447099a

Browse files
committed
Python: Update jmespath tests
1 parent 1c48aca commit 447099a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/ql/test/library-tests/frameworks/jmespath/taint_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import jmespath
22

33
def test_taint():
4-
data = TAINTED_DICT
4+
untrusted_data = TAINTED_DICT
55

6-
expression = jmespath.compile("foo.bar")
6+
safe_expression = jmespath.compile("foo.bar")
77

88
ensure_tainted(
9-
jmespath.search("foo.bar", data), # $ tainted
10-
jmespath.search("foo.bar", data=data), # $ tainted
9+
jmespath.search("foo.bar", untrusted_data), # $ tainted
10+
jmespath.search("foo.bar", data=untrusted_data), # $ tainted
1111

12-
expression.search(data), # $ tainted
13-
expression.search(value=data) # $ tainted
12+
safe_expression.search(untrusted_data), # $ tainted
13+
safe_expression.search(value=untrusted_data) # $ tainted
1414
)
1515

1616
# since ```jmespath.search("{wat: `foo`}", {})``` works (and outputs a dictionary),

0 commit comments

Comments
 (0)