File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
powershell/ql/lib/semmle/code/powershell/dataflow/flowsources Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 6
6
private import semmle.code.powershell.dataflow.internal.DataFlowPublic as DataFlow
7
7
// Need to import since frameworks can extend `RemoteFlowSource::Range`
8
8
private import semmle.code.powershell.Frameworks
9
+ private import semmle.code.powershell.dataflow.flowsources.FlowSources
9
10
10
11
/**
11
12
* A data flow source of remote user input.
12
13
*
13
14
* Extend this class to refine existing API models. If you want to model new APIs,
14
15
* extend `RemoteFlowSource::Range` instead.
15
16
*/
16
- class RemoteFlowSource extends DataFlow:: Node instanceof RemoteFlowSource:: Range {
17
- /** Gets a string that describes the type of this remote flow source. */
18
- string getSourceType ( ) { result = super .getSourceType ( ) }
17
+ class RemoteFlowSource extends SourceNode instanceof RemoteFlowSource:: Range {
18
+ override string getSourceType ( ) { result = "remote flow source" }
19
+
20
+ override string getThreatModel ( ) { result = "remote" }
19
21
}
20
22
21
23
/** Provides a class for modeling new sources of remote user input. */
@@ -31,3 +33,9 @@ module RemoteFlowSource {
31
33
abstract string getSourceType ( ) ;
32
34
}
33
35
}
36
+
37
+ private class ExternalRemoteFlowSource extends RemoteFlowSource:: Range {
38
+ ExternalRemoteFlowSource ( ) { this = ModelOutput:: getASourceNode ( "remote" , _) .asSource ( ) }
39
+
40
+ override string getSourceType ( ) { result = "remote flow" }
41
+ }
You can’t perform that action at this time.
0 commit comments