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 {
39
39
* An expression that has a type of `DbDataReader` or a sub-class, representing the result of a
40
40
* data command.
41
41
*/
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 * ( )
45
46
}
46
47
}
47
48
48
49
/** An expression that accesses a method of `DbDataReader` or a sub-class. */
49
- class DbDataReaderMethodStoredFlowSource extends DatabaseInputSource {
50
+ deprecated class DbDataReaderMethodStoredFlowSource extends DataFlow :: Node {
50
51
DbDataReaderMethodStoredFlowSource ( ) {
51
52
this .asExpr ( ) .( MethodCall ) .getTarget ( ) .getDeclaringType ( ) =
52
53
any ( SystemDataCommon:: DbDataReader dataReader ) .getASubType * ( )
53
54
}
54
55
}
55
56
56
57
/** An expression that accesses a property of `DbDataReader` or a sub-class. */
57
- class DbDataReaderPropertyStoredFlowSource extends DatabaseInputSource {
58
+ deprecated class DbDataReaderPropertyStoredFlowSource extends DataFlow :: Node {
58
59
DbDataReaderPropertyStoredFlowSource ( ) {
59
60
this .asExpr ( ) .( PropertyAccess ) .getTarget ( ) .getDeclaringType ( ) =
60
61
any ( SystemDataCommon:: DbDataReader dataReader ) .getASubType * ( )
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ import csharp
2
2
import semmle.code.csharp.security.dataflow.flowsources.Stored
3
3
4
4
from StoredFlowSource source
5
+ where source .asExpr ( ) .fromSource ( )
5
6
select source
You can’t perform that action at this time.
0 commit comments