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 11import jmespath
22
33def 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),
You can’t perform that action at this time.
0 commit comments