File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
java/ql/test/library-tests/dataflow/field-value Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ import java .io .FilterInputStream ;
2+ import java .io .InputStream ;
3+
4+ public class A {
5+
6+ public String src ;
7+
8+ private static void sink (Object o ) {}
9+
10+ public void test () {
11+ sink (src ); // $ hasTaintFlow
12+ }
13+
14+ class TestFis extends FilterInputStream {
15+
16+ protected TestFis (InputStream in ) {
17+ super (in );
18+ }
19+
20+ public void testOutOfSource () {
21+ // out of source field
22+ sink (this .in ); // $ hasTaintFlow
23+ }
24+ }
25+ }
Original file line number Diff line number Diff line change 1+ failures
2+ testFailures
Original file line number Diff line number Diff line change 1+ import java
2+ import TestUtilities.InlineFlowTest
3+
4+ module FieldValueConfig implements DataFlow:: ConfigSig {
5+ predicate isSource ( DataFlow:: Node source ) { source instanceof DataFlow:: FieldValueNode }
6+
7+ predicate isSink ( DataFlow:: Node sink ) { DefaultFlowConfig:: isSink ( sink ) }
8+ }
9+
10+ import TaintFlowTest< FieldValueConfig >
You can’t perform that action at this time.
0 commit comments