CodeShield-Security / SPDS

Efficient and Precise Pointer-Tracking Data-Flow Framework
Eclipse Public License 2.0
66 stars 12 forks source link

Subqueries must continue in callers #19

Closed johspaeth closed 3 years ago

johspaeth commented 3 years ago

When subqueries are triggered, and a subquery reaches the entry point of a method, it does not seem to propagate to any callee.

class CustomQuery1{
    final String field;
    private CustomQuery() {
        field = "someInfo";
    }

    public static void main() {
        new CustomQuery1().example();
    }

   public void example() {
        String info = field.toString();
        queryFor(info); //Should find "someInfo" but does not. 
    }
}
class CustomQuery2{
    final String field;
    private CustomQuery() {
        field = "someInfo";
    }

    public static void main() {
        new CustomQuery(2).example();
    }

   public void example2() {
        CustomQuery2 c = new CustomQuery2();
        String info = c.field.getData();
        queryFor(info); //Should find "someInfo" and does so
    }
}
johspaeth commented 3 years ago

I added a test case and tried to reproduce the issue in https://github.com/CodeShield-Security/SPDS/commit/fdf107909e08344f9c52fac7cce7d988330c63f2#diff-1babeab9f40acfdc252bf8af3313ab8e233d54ccd9bcdb8a72a8a4ba23863231. However, the error did not occur on that setup.