File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
powershell/ql/lib/semmle/code/powershell/dataflow/flowsources Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 2
2
private import semmle.code.powershell.dataflow.internal.DataFlowPublic as DataFlow
3
3
import semmle.code.powershell.dataflow.flowsources.Remote
4
4
import semmle.code.powershell.dataflow.flowsources.Local
5
+ import semmle.code.powershell.dataflow.flowsources.Stored
5
6
import semmle.code.powershell.frameworks.data.internal.ApiGraphModels
6
7
7
8
/**
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Provides classes representing sources of stored data.
3
+ */
4
+
5
+ import powershell
6
+ private import FlowSources
7
+
8
+ /** A data flow source of stored user input. */
9
+ abstract class StoredFlowSource extends SourceNode {
10
+ override string getThreatModel ( ) { result = "local" }
11
+ }
12
+
13
+ /**
14
+ * A node with input from a database.
15
+ */
16
+ abstract class DatabaseInputSource extends StoredFlowSource {
17
+ override string getThreatModel ( ) { result = "database" }
18
+
19
+ override string getSourceType ( ) { result = "database input" }
20
+ }
21
+
22
+ private class ExternalDatabaseInputSource extends DatabaseInputSource {
23
+ ExternalDatabaseInputSource ( ) { this = ModelOutput:: getASourceNode ( "database" , _) .asSource ( ) }
24
+ }
25
+
26
+ /** A file stream source is considered a stored flow source. */
27
+ abstract class FileStreamStoredFlowSource extends StoredFlowSource {
28
+ override string getThreatModel ( ) { result = "file" }
29
+
30
+ override string getSourceType ( ) { result = "file stream" }
31
+ }
32
+
33
+ private class ExternalFileStreamStoredFlowSource extends FileStreamStoredFlowSource {
34
+ ExternalFileStreamStoredFlowSource ( ) { this = ModelOutput:: getASourceNode ( "file" , _) .asSource ( ) }
35
+ }
You can’t perform that action at this time.
0 commit comments