Skip to content

Commit 10d6ebf

Browse files
committed
Use of inline tests for dataflow queries
1 parent b5a6f6e commit 10d6ebf

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
missingAnnotationOnSink
2+
failures
3+
| UnsafeUnpack.py:12:46:12:58 | Comment # $result=BAD | Missing result:result=BAD |
4+
| UnsafeUnpack.py:55:53:55:65 | Comment # $result=BAD | Missing result:result=BAD |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import python
2+
import experimental.dataflow.TestUtil.DataflowQueryTest

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
f.write(response.raw.read())
1010

1111
untarredpath = "/tmp/tmp123"
12-
shutil.unpack_archive(tarpath, untarredpath)
12+
shutil.unpack_archive(tarpath, untarredpath) # $result=BAD
1313

1414

1515
import tempfile
@@ -52,5 +52,5 @@
5252
)
5353
fs.get(uri, to_path, recursive=True)
5454
if unpack_path:
55-
shutil.unpack_archive(to_path, unpack_path)
55+
shutil.unpack_archive(to_path, unpack_path) # $result=BAD
5656
to_path = unpack_path

0 commit comments

Comments
 (0)