File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed
csharp/ql/test/library-tests/dataflow/flowsources/aspremote Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ using Microsoft . AspNetCore . Mvc ;
2+
3+ namespace Testing
4+ {
5+
6+ public class ViewModel
7+ {
8+ public string RequestId { get ; set ; }
9+
10+ public object Query ;
11+ }
12+
13+ public class TestController : Controller
14+ {
15+ public object MyAction ( ViewModel viewModel )
16+ {
17+ throw null ;
18+ }
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ remoteFlowSourceMembers
2+ | AspRemoteFlowSource.cs:8:23:8:31 | RequestId |
3+ | AspRemoteFlowSource.cs:10:23:10:27 | Query |
4+ remoteFlowSources
5+ | AspRemoteFlowSource.cs:15:42:15:50 | viewModel |
Original file line number Diff line number Diff line change 1+ import csharp
2+ import semmle.code.csharp.security.dataflow.flowsources.Remote
3+
4+ query predicate remoteFlowSourceMembers ( TaintTracking:: TaintedMember m ) { m .fromSource ( ) }
5+
6+ query predicate remoteFlowSources ( AspNetCoreRemoteFlowSource s ) {
7+ s .getEnclosingCallable ( ) .fromSource ( )
8+ }
Original file line number Diff line number Diff line change 1+ semmle-extractor-options: /nostdlib /noconfig
2+ semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj
3+ semmle-extractor-options: --load-sources-from-project:${testdir}/../../../../resources/stubs/Microsoft.Extensions.Primitives/6.0.0/Microsoft.Extensions.Primitives.csproj
4+ semmle-extractor-options: ${testdir}/../../../../resources/stubs/AspNetCore.cs
You can’t perform that action at this time.
0 commit comments