File tree Expand file tree Collapse file tree 5 files changed +2343
-61
lines changed
library-tests/frameworks/JsonNET Expand file tree Collapse file tree 5 files changed +2343
-61
lines changed Original file line number Diff line number Diff line change 1
- // semmle-extractor-options: ${testdir}/ ../../../resources/stubs/JsonNET.cs /r:System.Linq.dll
1
+ // semmle-extractor-options: /nostdlib /noconfig --load-sources-from-project: ../../../resources/stubs/Newtonsoft.Json/13.0.1/Newtonsoft.Json.csproj
2
2
3
3
using Newtonsoft . Json ;
4
4
using Newtonsoft . Json . Linq ;
@@ -47,14 +47,14 @@ void F()
47
47
Sink ( ( string ) jobject [ "1" ] [ "2" ] ) ;
48
48
49
49
// Linq JToken tests
50
- Sink ( jobject . First ( i => true ) ) ;
50
+ Sink ( jobject . First ( ( JToken i ) => true ) ) ;
51
51
Sink ( jobject [ "2" ] . First ( i => true ) ) ;
52
52
Sink ( jobject [ "2" ] [ "3" ] . First ( i => true ) ) ;
53
53
Sink ( jobject . SelectToken ( "Manufacturers[0].Name" ) ) ;
54
54
55
55
JObject untaintedJObject = JObject . Parse ( u ) ;
56
56
Sink ( untaintedJObject ) ;
57
- Sink ( untaintedJObject . First ( i => true ) ) ;
57
+ Sink ( untaintedJObject . First ( ( JToken i ) => true ) ) ;
58
58
}
59
59
60
60
public class Object
@@ -64,7 +64,7 @@ public class Object
64
64
[ JsonIgnore ]
65
65
public int untainted ;
66
66
67
- public Dictionary < string , string > taintedValues ;
67
+ public Dictionary < string , string > taintedValues ;
68
68
69
69
public string [ ] taintedArray ;
70
70
}
Original file line number Diff line number Diff line change 9
9
| Json.cs:18:24:18:32 | "tainted" | Json.cs:45:18:45:29 | access to indexer |
10
10
| Json.cs:18:24:18:32 | "tainted" | Json.cs:46:18:46:34 | access to indexer |
11
11
| Json.cs:18:24:18:32 | "tainted" | Json.cs:47:18:47:42 | call to operator explicit conversion |
12
- | Json.cs:18:24:18:32 | "tainted" | Json.cs:50:18:50:41 | call to method First |
12
+ | Json.cs:18:24:18:32 | "tainted" | Json.cs:50:18:50:50 | call to method First |
13
13
| Json.cs:18:24:18:32 | "tainted" | Json.cs:51:18:51:46 | call to method First |
14
14
| Json.cs:18:24:18:32 | "tainted" | Json.cs:52:18:52:51 | call to method First |
15
15
| Json.cs:18:24:18:32 | "tainted" | Json.cs:53:18:53:61 | call to method SelectToken |
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments