Python: only show results in extracted files

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-11-06 12:01:16 +01:00
parent 6cecd3ba83
commit 64b9e9150e
2 changed files with 3 additions and 2 deletions

View File

@@ -82,5 +82,4 @@
| code/t_type.py:3:1:3:16 | ControlFlowNode for ClassExpr | code/t_type.py:6:1:6:9 | ControlFlowNode for type() |
| code/t_type.py:3:1:3:16 | ControlFlowNode for ClassExpr | code/t_type.py:13:5:13:13 | ControlFlowNode for type() |
| code/test_package/module2.py:5:5:5:6 | ControlFlowNode for Dict | code/j_convoluted_imports.py:25:1:25:1 | ControlFlowNode for r |
| file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_py_abc.py:14:1:14:20 | ControlFlowNode for ClassExpr | file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/io.py:72:37:72:47 | ControlFlowNode for Attribute |
| file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/abc.py:71:5:71:24 | ControlFlowNode for ClassExpr | file:///usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/io.py:72:37:72:47 | ControlFlowNode for Attribute |
| code/v_pointsto_regressions.py:15:18:15:21 | ControlFlowNode for self | code/v_pointsto_regressions.py:19:9:19:12 | ControlFlowNode for self |

View File

@@ -28,6 +28,8 @@ predicate hasFlow(DataFlow::Node origin, DataFlow::Node pointer) {
from DataFlow::Node pointer, DataFlow::Node origin
where
exists(pointer.getLocation().getFile().getRelativePath()) and
exists(origin.getLocation().getFile().getRelativePath()) and
pointsToOrigin(pointer, origin) and
not hasFlow(origin, pointer)
select origin, pointer