File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
src/semmle/code/java/frameworks
test/library-tests/dataflow/taint Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ private class StringSummaryCsv extends SummaryModelCsv {
48
48
"java.lang;AbstractStringBuilder;true;toString;;;Argument[-1];ReturnValue;taint" ,
49
49
"java.lang;StringBuffer;true;StringBuffer;(CharSequence);;Argument[0];Argument[-1];taint" ,
50
50
"java.lang;StringBuffer;true;StringBuffer;(String);;Argument[0];Argument[-1];taint" ,
51
- "java.lang;StringBuilder;true;StringBuilder;;;Argument[0];Argument[-1];taint"
51
+ "java.lang;StringBuilder;true;StringBuilder;;;Argument[0];Argument[-1];taint" ,
52
+ "java.lang;CharSequence;true;subSequence;;;Argument[-1];ReturnValue;taint"
52
53
]
53
54
}
54
55
}
Original file line number Diff line number Diff line change
1
+ public class CharSeq {
2
+ public static String taint () { return "tainted" ; }
3
+
4
+ public static void sink (Object o ) { }
5
+
6
+ void test1 () {
7
+ CharSequence seq = taint ().subSequence (0 ,1 );
8
+ sink (seq );
9
+
10
+ CharSequence seqFromSeq = seq .subSequence (0 , 1 );
11
+ sink (seqFromSeq );
12
+ }
13
+ }
Original file line number Diff line number Diff line change 37
37
| B.java:15:21:15:27 | taint(...) | B.java:143:10:143:44 | toURL(...) |
38
38
| B.java:15:21:15:27 | taint(...) | B.java:146:10:146:37 | toPath(...) |
39
39
| B.java:15:21:15:27 | taint(...) | B.java:149:10:149:46 | toFile(...) |
40
+ | CharSeq.java:7:26:7:32 | taint(...) | CharSeq.java:8:12:8:14 | seq |
41
+ | CharSeq.java:7:26:7:32 | taint(...) | CharSeq.java:11:12:11:21 | seqFromSeq |
40
42
| MethodFlow.java:7:22:7:28 | taint(...) | MethodFlow.java:8:10:8:16 | tainted |
41
43
| MethodFlow.java:9:31:9:37 | taint(...) | MethodFlow.java:10:10:10:17 | tainted2 |
42
44
| MethodFlow.java:11:35:11:41 | taint(...) | MethodFlow.java:12:10:12:17 | tainted3 |
You can’t perform that action at this time.
0 commit comments