/* * Copyright (c) 2017 - present Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ package codetoanalyze.java.quandary; import com.facebook.infer.builtins.InferTaint; class Traces { void sourceMethod() { Obj source = (Obj) InferTaint.inferSecretSource(); callSameSink(null, source, null, null); } void callSameSink(Obj o1, Obj o2, Obj o3, Obj o4) { callMySink(o1); callMySinkIndirect(o2); // test that we expand this sink in the trace callMySink(o3); callMySink(o4); } void callMySinkIndirect(Obj o) { callMySink(o); } void callMySink(Obj o) { InferTaint.inferSensitiveSink(o); } }