Skip to content

Commit 7daaf77

Browse files
committed
Make query alert refer to AST nodes rather than CFG nodes.
1 parent 504cb64 commit 7daaf77

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ FunctionObject temporary_name_function(string mod, string function) {
2525
result = any(ModuleObject m | m.getName() = mod).getAttribute(function)
2626
}
2727

28-
from CallNode c, string mod, string function
28+
from Call c, string mod, string function
2929
where
30-
temporary_name_function(mod, function).getACall() = c
30+
temporary_name_function(mod, function).getACall().getNode() = c
3131
select c, "Call to deprecated function $@.$@ may be insecure.", mod, function
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
| InsecureTemporaryFile.py:5:16:5:23 | ControlFlowNode for mktemp() | Call to deprecated function $@.$@ may be insecure. | tempfile | mktemp |
2-
| InsecureTemporaryFile.py:11:16:11:27 | ControlFlowNode for Attribute() | Call to deprecated function $@.$@ may be insecure. | os | tempnam |
3-
| InsecureTemporaryFile.py:17:16:17:26 | ControlFlowNode for Attribute() | Call to deprecated function $@.$@ may be insecure. | os | tmpnam |
1+
| InsecureTemporaryFile.py:5:16:5:23 | mktemp() | Call to deprecated function $@.$@ may be insecure. | tempfile | mktemp |
2+
| InsecureTemporaryFile.py:11:16:11:27 | Attribute() | Call to deprecated function $@.$@ may be insecure. | os | tempnam |
3+
| InsecureTemporaryFile.py:17:16:17:26 | Attribute() | Call to deprecated function $@.$@ may be insecure. | os | tmpnam |

0 commit comments

Comments
 (0)