mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
Merge pull request #9635 from MathiasVP/swift-add-remote-flow-sources
Swift: Add `RemoteFlowSource`
This commit is contained in:
18
swift/ql/lib/codeql/swift/dataflow/FlowSources.qll
Normal file
18
swift/ql/lib/codeql/swift/dataflow/FlowSources.qll
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Provides classes representing various flow sources for taint tracking.
|
||||
*/
|
||||
|
||||
private import ExternalFlow
|
||||
private import internal.DataFlowPublic
|
||||
|
||||
/** A data flow source of remote user input. */
|
||||
abstract class RemoteFlowSource extends Node {
|
||||
/** Gets a string that describes the type of this remote flow source. */
|
||||
abstract string getSourceType();
|
||||
}
|
||||
|
||||
private class ExternalRemoteFlowSource extends RemoteFlowSource {
|
||||
ExternalRemoteFlowSource() { sourceNode(this, "remote") }
|
||||
|
||||
override string getSourceType() { result = "external" }
|
||||
}
|
||||
Reference in New Issue
Block a user