File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
.github/codeql/custom-queries/python Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
- import python
2
1
/*
3
- * Identify use of rmtree from shutil
4
- *
5
- * shutil.rmtree(...)
6
- *
2
+ * @id python/call-to-shutil-rmtree
3
+ * @name Identify use of rmtree from shutil
4
+ * @description We have specific ways to delete files - this query
5
+ * notifies when there are calls to `shutil.rmtree` so
6
+ * that we can revue how deletion is done.
7
+ * @kind problem
8
+ * @problem.severity warning
9
+ * @precision high
10
+ * @tags correctness
7
11
*
8
12
*/
9
13
10
- // from PythonFunctionValue rmtree, CallNode call
11
- // where rmtree.getName() = "rmtree" and rmtree.getACall() = call
12
- // select rmtree.getName(), rmtree.getClass()
14
+ import python
13
15
14
16
from ControlFlowNode call , Value eval
15
17
where eval = Value:: named ( "shutil.rmtree" ) and
You can’t perform that action at this time.
0 commit comments