@@ -14,6 +14,68 @@ private import semmle.python.dataflow.new.RemoteFlowSources
1414private import semmle.python.dataflow.new.TaintTracking
1515private import experimental.semmle.python.Frameworks
1616
17+
18+ /** Provides classes for modeling copying file related APIs. */
19+ module CopyFile {
20+ /**
21+ * A data flow node for copying file.
22+ *
23+ * Extend this class to model new APIs. If you want to refine existing API models,
24+ * extend `CopyFile` instead.
25+ */
26+ abstract class Range extends DataFlow:: Node {
27+ /**
28+ * Gets the argument containing the path.
29+ */
30+ abstract DataFlow:: Node getAPathArgument ( ) ;
31+ }
32+ }
33+
34+ /**
35+ * A data flow node for copying file.
36+ *
37+ * Extend this class to refine existing API models. If you want to model new APIs,
38+ * extend `CopyFile::Range` instead.
39+ */
40+ class CopyFile extends DataFlow:: Node {
41+ CopyFile:: Range range ;
42+
43+ CopyFile ( ) { this = range }
44+
45+ DataFlow:: Node getAPathArgument ( ) { result = range .getAPathArgument ( ) }
46+ }
47+
48+ /** Provides classes for modeling zip related APIs. */
49+ module ZipFile {
50+ /**
51+ * A data flow node for zipfile.
52+ *
53+ * Extend this class to model new APIs. If you want to refine existing API models,
54+ * extend `ZipFile` instead.
55+ */
56+ abstract class Range extends DataFlow:: Node {
57+ /**
58+ * Get the parameter value of the zip function.
59+ */
60+ abstract DataFlow:: Node getAnInput ( ) ;
61+
62+ }
63+ }
64+
65+ /**
66+ * A data flow node for zip.
67+ *
68+ * Extend this class to refine existing API models. If you want to model new APIs,
69+ * extend `ZipFile::Range` instead.
70+ */
71+ class ZipFile extends DataFlow:: Node {
72+ ZipFile:: Range range ;
73+
74+ ZipFile ( ) { this = range }
75+
76+ DataFlow:: Node getAnInput ( ) { result = range .getAnInput ( ) }
77+ }
78+
1779/** Provides classes for modeling log related APIs. */
1880module LogOutput {
1981 /**
0 commit comments