File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
lib/semmle/code/csharp/security/dataflow/flowsources
test/library-tests/frameworks/EntityFramework Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -39,22 +39,23 @@ class DbRawSqlStoredFlowSource extends DatabaseInputSource {
3939 * An expression that has a type of `DbDataReader` or a sub-class, representing the result of a
4040 * data command.
4141 */
42- class DbDataReaderStoredFlowSource extends DatabaseInputSource {
43- DbDataReaderStoredFlowSource ( ) {
44- this .asExpr ( ) .getType ( ) = any ( SystemDataCommon:: DbDataReader dataReader ) .getASubType * ( )
42+ class DbDataReaderParameterStoredFlowSource extends DatabaseInputSource {
43+ DbDataReaderParameterStoredFlowSource ( ) {
44+ [ this .asParameter ( ) .getType ( ) , this .asExpr ( ) .( MethodCall ) .getTarget ( ) .getReturnType ( ) ] =
45+ any ( SystemDataCommon:: DbDataReader dataReader ) .getASubType * ( )
4546 }
4647}
4748
4849/** An expression that accesses a method of `DbDataReader` or a sub-class. */
49- class DbDataReaderMethodStoredFlowSource extends DatabaseInputSource {
50+ deprecated class DbDataReaderMethodStoredFlowSource extends DataFlow :: Node {
5051 DbDataReaderMethodStoredFlowSource ( ) {
5152 this .asExpr ( ) .( MethodCall ) .getTarget ( ) .getDeclaringType ( ) =
5253 any ( SystemDataCommon:: DbDataReader dataReader ) .getASubType * ( )
5354 }
5455}
5556
5657/** An expression that accesses a property of `DbDataReader` or a sub-class. */
57- class DbDataReaderPropertyStoredFlowSource extends DatabaseInputSource {
58+ deprecated class DbDataReaderPropertyStoredFlowSource extends DataFlow :: Node {
5859 DbDataReaderPropertyStoredFlowSource ( ) {
5960 this .asExpr ( ) .( PropertyAccess ) .getTarget ( ) .getDeclaringType ( ) =
6061 any ( SystemDataCommon:: DbDataReader dataReader ) .getASubType * ( )
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ import csharp
22import semmle.code.csharp.security.dataflow.flowsources.Stored
33
44from StoredFlowSource source
5+ where source .asExpr ( ) .fromSource ( )
56select source
You can’t perform that action at this time.
0 commit comments