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 22private import semmle.code.powershell.dataflow.internal.DataFlowPublic as DataFlow
33import semmle.code.powershell.dataflow.flowsources.Remote
44import semmle.code.powershell.dataflow.flowsources.Local
5+ import semmle.code.powershell.dataflow.flowsources.Stored
56import semmle.code.powershell.frameworks.data.internal.ApiGraphModels
67
78/**
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