Skip to content

Commit 3e11b2e

Browse files
committed
C#: Update remote flow sources test to also report tainted members.
1 parent 73360ee commit 3e11b2e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

csharp/ql/test/library-tests/dataflow/flowsources/remote/remoteFlowSource.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
remoteFlowSourceMembers
2+
remoteFlowSources
13
| Controller.cs:11:43:11:52 | sampleData | ASP.NET MVC action method parameter |
24
| Controller.cs:11:62:11:66 | taint | ASP.NET MVC action method parameter |
35
| Controller.cs:16:43:16:52 | sampleData | ASP.NET MVC action method parameter |
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import semmle.code.csharp.security.dataflow.flowsources.Remote
22

3-
from RemoteFlowSource source
4-
where source.getLocation().getFile().fromSource()
5-
select source, source.getSourceType()
3+
query predicate remoteFlowSourceMembers(TaintTracking::TaintedMember m) { m.fromSource() }
4+
5+
query predicate remoteFlowSources(RemoteFlowSource source, string type) {
6+
source.getLocation().getFile().fromSource() and type = source.getSourceType()
7+
}

0 commit comments

Comments
 (0)