File tree Expand file tree Collapse file tree
csharp/ql/lib/semmle/code/csharp
security/dataflow/flowsources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ module EntityFramework {
4949 StoredFlowSource ( ) {
5050 this .asExpr ( ) = any ( PropertyRead read | read .getTarget ( ) instanceof MappedProperty )
5151 }
52+
53+ override string getSourceType ( ) { result = "ORM mapped property" }
5254 }
5355
5456 private class EFClass extends Class {
Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ module NHibernate {
9191 StoredFlowSource ( ) {
9292 this .asExpr ( ) = any ( PropertyRead read | read .getTarget ( ) instanceof MappedProperty )
9393 }
94+
95+ override string getSourceType ( ) { result = "ORM mapped property" }
9496 }
9597
9698 /**
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ abstract class SourceNode extends DataFlow::Node {
1414 * Gets a string that represents the source kind with respect to threat modeling.
1515 */
1616 abstract string getThreatModel ( ) ;
17+
18+ /** Gets a string that describes the type of this flow source. */
19+ abstract string getSourceType ( ) ;
1720}
1821
1922/**
Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
99
1010/** A data flow source of local data. */
1111abstract class LocalFlowSource extends SourceNode {
12- /** Gets a string that describes the type of this local flow source. */
13- abstract string getSourceType ( ) ;
12+ override string getSourceType ( ) { result = "local flow source" }
1413
1514 override string getThreatModel ( ) { result = "local" }
1615}
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
1717
1818/** A data flow source of remote user input. */
1919abstract class RemoteFlowSource extends SourceNode {
20- /** Gets a string that describes the type of this remote flow source. */
21- abstract string getSourceType ( ) ;
20+ override string getSourceType ( ) { result = "remote flow source" }
2221
2322 override string getThreatModel ( ) { result = "remote" }
2423}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ private import semmle.code.csharp.security.dataflow.flowsources.FlowSources
1313
1414/** A data flow source of stored user input. */
1515abstract class StoredFlowSource extends SourceNode {
16+ // override string getSourceType() { result = "stored flow source" }
1617 override string getThreatModel ( ) { result = "local" }
1718}
1819
@@ -21,6 +22,8 @@ abstract class StoredFlowSource extends SourceNode {
2122 */
2223abstract class DatabaseInputSource extends StoredFlowSource {
2324 override string getThreatModel ( ) { result = "database" }
25+
26+ override string getSourceType ( ) { result = "database input" }
2427}
2528
2629/**
@@ -76,4 +79,6 @@ class FileStreamStoredFlowSource extends StoredFlowSource {
7679 FileStreamStoredFlowSource ( ) { sourceNode ( this , "file" ) }
7780
7881 override string getThreatModel ( ) { result = "file" }
82+
83+ override string getSourceType ( ) { result = "file stream" }
7984}
You can’t perform that action at this time.
0 commit comments