public void constantStaticArrayTest() {
    String tainted = TelephonyManager.getDeviceId();
    staticArray[0] = tainted;

    ConnectionManager cm = new ConnectionManager();
    cm.publish(staticArray[0]);
  }
 private void leakIfGreaterThan(int i, int j) {
   if (i > j) {
     String tainted = TelephonyManager.getDeviceId();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(tainted);
   }
 }
 public void fpConstIntraproceduralTest1() {
   int i = 3;
   if (i > 5) {
     String tainted = TelephonyManager.getDeviceId();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(tainted);
   }
 }
 public void allocSiteTest1() {
   String tainted = TelephonyManager.getDeviceId();
   int i = 3;
   Base obj = i > 10 ? new A() : new B();
   String copy = obj.transform(tainted);
   ConnectionManager cm = new ConnectionManager();
   cm.publish(copy);
 }
 private void leakRecursive(int i) {
   if (i > 0) {
     String tainted = TelephonyManager.getDeviceId();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(tainted);
     return;
   }
   leakRecursive(0);
 }
 public void constantExceptionTest1() {
   try {
     String secret = getSecretAndThrow();
     ConnectionManager cm = new ConnectionManager();
     cm.publish(secret);
   } catch (MyException ex) {
     ConnectionManager cm = new ConnectionManager();
     cm.publish(ex + TelephonyManager.getDeviceId());
   }
 }
Example #7
0
  public void concreteWriteReadTest() {
    String tainted = TelephonyManager.getDeviceId();
    SynchronousQueue<String> q = new SynchronousQueue<String>();
    q.add(tainted);
    // not implemented for SynchronousQueue: q.element();
    String taintedElement3 = q.poll();

    ConnectionManager cm = new ConnectionManager();
    cm.publish(taintedElement3);
  }
Example #8
0
 public void concreteWriteReadNegativeTest() {
   String tainted = TelephonyManager.getDeviceId();
   String untainted = "Hello world!";
   SynchronousQueue<String> q = new SynchronousQueue<String>();
   SynchronousQueue<String> p = new SynchronousQueue<String>();
   q.add(tainted);
   p.add(untainted);
   String taintedElement = q.poll();
   String untaintedElement = p.poll();
   taintedElement.toString();
   ConnectionManager cm = new ConnectionManager();
   cm.publish(untaintedElement);
 }
 public void send() {
   ConnectionManager cm = new ConnectionManager();
   cm.publish(field);
 }
 public void constantFieldTest() {
   ConstantClass c = new ConstantClass();
   ConnectionManager cm = new ConnectionManager();
   cm.publish(c.e);
 }
 public void easyConstantVarTest() {
   final String e = TelephonyManager.getDeviceId();
   ConnectionManager cm = new ConnectionManager();
   cm.publish(e);
 }
 public void easyConstantFieldTest() {
   ConnectionManager cm = new ConnectionManager();
   cm.publish(tainted);
 }