Skip to content

Commit cd596f5

Browse files
committed
Python: Reformat test-file
All those newlines are not good for inline expectations
1 parent e5bd633 commit cd596f5

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

python/ql/test/experimental/query-tests/Security/CWE-409/DecompressionBombs.expected

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ edges
3030
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:55:23:55:31 | ControlFlowNode for file_path | provenance | |
3131
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:56:21:56:29 | ControlFlowNode for file_path | provenance | |
3232
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:58:40:58:48 | ControlFlowNode for file_path | provenance | |
33-
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:60:22:60:30 | ControlFlowNode for file_path | provenance | |
34-
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:61:21:61:29 | ControlFlowNode for file_path | provenance | |
35-
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:62:42:62:50 | ControlFlowNode for file_path | provenance | |
36-
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:64:23:64:31 | ControlFlowNode for file_path | provenance | |
37-
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:65:36:65:44 | ControlFlowNode for file_path | provenance | |
33+
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:59:22:59:30 | ControlFlowNode for file_path | provenance | |
34+
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:60:21:60:29 | ControlFlowNode for file_path | provenance | |
35+
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:61:42:61:50 | ControlFlowNode for file_path | provenance | |
36+
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:62:23:62:31 | ControlFlowNode for file_path | provenance | |
37+
| test.py:27:26:27:34 | ControlFlowNode for file_path | test.py:63:36:63:44 | ControlFlowNode for file_path | provenance | |
3838
nodes
3939
| test.py:9:16:9:24 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
4040
| test.py:10:5:10:52 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() |
@@ -68,11 +68,11 @@ nodes
6868
| test.py:55:23:55:31 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
6969
| test.py:56:21:56:29 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
7070
| test.py:58:40:58:48 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
71-
| test.py:60:22:60:30 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
72-
| test.py:61:21:61:29 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
73-
| test.py:62:42:62:50 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
74-
| test.py:64:23:64:31 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
75-
| test.py:65:36:65:44 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
71+
| test.py:59:22:59:30 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
72+
| test.py:60:21:60:29 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
73+
| test.py:61:42:61:50 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
74+
| test.py:62:23:62:31 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
75+
| test.py:63:36:63:44 | ControlFlowNode for file_path | semmle.label | ControlFlowNode for file_path |
7676
subpaths
7777
#select
7878
| test.py:10:5:10:52 | ControlFlowNode for Attribute() | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:10:5:10:52 | ControlFlowNode for Attribute() | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
@@ -96,8 +96,8 @@ subpaths
9696
| test.py:55:23:55:31 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:55:23:55:31 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
9797
| test.py:56:21:56:29 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:56:21:56:29 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
9898
| test.py:58:40:58:48 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:58:40:58:48 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
99-
| test.py:60:22:60:30 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:60:22:60:30 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
100-
| test.py:61:21:61:29 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:61:21:61:29 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
101-
| test.py:62:42:62:50 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:62:42:62:50 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
102-
| test.py:64:23:64:31 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:64:23:64:31 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
103-
| test.py:65:36:65:44 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:65:36:65:44 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
99+
| test.py:59:22:59:30 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:59:22:59:30 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
100+
| test.py:60:21:60:29 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:60:21:60:29 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
101+
| test.py:61:42:61:50 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:61:42:61:50 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
102+
| test.py:62:23:62:31 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:62:23:62:31 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |
103+
| test.py:63:36:63:44 | ControlFlowNode for file_path | test.py:9:16:9:24 | ControlFlowNode for file_path | test.py:63:36:63:44 | ControlFlowNode for file_path | This uncontrolled file extraction is $@. | test.py:9:16:9:24 | ControlFlowNode for file_path | depends on this user controlled data |

python/ql/test/experimental/query-tests/Security/CWE-409/test.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,21 @@ async def bomb(file_path):
5555
pandas.read_table(file_path, compression='gzip') # $ result=BAD
5656
pandas.read_xml(file_path, compression='gzip') # $ result=BAD
5757

58-
pandas.read_csv(filepath_or_buffer=file_path,
59-
compression='gzip') # $ result=BAD
58+
pandas.read_csv(filepath_or_buffer=file_path, compression='gzip') # $ result=BAD
6059
pandas.read_json(file_path, compression='gzip') # $ result=BAD
6160
pandas.read_sas(file_path, compression='gzip') # $ result=BAD
62-
pandas.read_stata(filepath_or_buffer=file_path,
63-
compression='gzip') # $ result=BAD
61+
pandas.read_stata(filepath_or_buffer=file_path, compression='gzip') # $ result=BAD
6462
pandas.read_table(file_path, compression='gzip') # $ result=BAD
65-
pandas.read_xml(path_or_buffer=file_path,
66-
compression='gzip') # $ result=BAD
63+
pandas.read_xml(path_or_buffer=file_path, compression='gzip') # $ result=BAD
6764

6865
# no compression no DOS
6966
pandas.read_table(file_path, compression='tar') # $result=OK
7067
pandas.read_xml(file_path, compression='tar') # $result=OK
7168

72-
pandas.read_csv(filepath_or_buffer=file_path,
73-
compression='tar') # $result=OK
69+
pandas.read_csv(filepath_or_buffer=file_path, compression='tar') # $result=OK
7470
pandas.read_json(file_path, compression='tar') # $result=OK
7571
pandas.read_sas(file_path, compression='tar') # $result=OK
76-
pandas.read_stata(filepath_or_buffer=file_path,
77-
compression='tar') # $result=OK
72+
pandas.read_stata(filepath_or_buffer=file_path, compression='tar') # $result=OK
7873
pandas.read_table(file_path, compression='tar') # $result=OK
7974
pandas.read_xml(path_or_buffer=file_path, compression='tar') # $result=OK
8075

0 commit comments

Comments
 (0)