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 66private import semmle.code.powershell.dataflow.internal.DataFlowPublic as DataFlow
77// Need to import since frameworks can extend `RemoteFlowSource::Range`
88private import semmle.code.powershell.Frameworks
9+ private import semmle.code.powershell.dataflow.flowsources.FlowSources
910
1011/**
1112 * A data flow source of remote user input.
1213 *
1314 * Extend this class to refine existing API models. If you want to model new APIs,
1415 * extend `RemoteFlowSource::Range` instead.
1516 */
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" }
1921}
2022
2123/** Provides a class for modeling new sources of remote user input. */
@@ -31,3 +33,9 @@ module RemoteFlowSource {
3133 abstract string getSourceType ( ) ;
3234 }
3335}
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