File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
python/ql/test/library-tests/frameworks/jmespath Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import jmespath
2
2
3
3
def test_taint ():
4
- data = TAINTED_DICT
4
+ untrusted_data = TAINTED_DICT
5
5
6
- expression = jmespath .compile ("foo.bar" )
6
+ safe_expression = jmespath .compile ("foo.bar" )
7
7
8
8
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
11
11
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
14
14
)
15
15
16
16
# since ```jmespath.search("{wat: `foo`}", {})``` works (and outputs a dictionary),
You can’t perform that action at this time.
0 commit comments