Fix tests by stubbing relevant os functions.

This commit is contained in:
Taus Brock-Nannestad
2019-01-29 17:27:14 +01:00
parent 6f7c96db54
commit edd4468d08
3 changed files with 10 additions and 0 deletions

View File

@@ -1 +1,3 @@
| InsecureTemporaryFile.py:5:16:5:23 | ControlFlowNode for mktemp() | Call to deprecated function $@.$@ may be insecure. | tempfile | mktemp |
| InsecureTemporaryFile.py:11:16:11:27 | ControlFlowNode for Attribute() | Call to deprecated function $@.$@ may be insecure. | os | tempnam |
| InsecureTemporaryFile.py:17:16:17:26 | ControlFlowNode for Attribute() | Call to deprecated function $@.$@ may be insecure. | os | tmpnam |

View File

@@ -0,0 +1,2 @@
semmle-extractor-options: -p ../lib/ --max-import-depth=3
optimize: true

View File

@@ -9,3 +9,9 @@ def chmod(path, mode):
def open(path, flags, mode):
pass
def tempnam(*args):
pass
def tmpnam(*args):
pass