Skip to content

Commit

Permalink
Propogator based taint-flows issue fixed, Boomerang and Seed factory …
Browse files Browse the repository at this point in the history
…refactored, and Sample application modified.
  • Loading branch information
arktt committed Oct 15, 2020
1 parent 2d9adec commit 02e8da8
Show file tree
Hide file tree
Showing 5 changed files with 347 additions and 244 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ private static void runSecucheckAnalysis(SecucheckAnalysis secucheckAnalysis)
secucheckAnalysis.setApplicationClassPath(getAppClassPath());
secucheckAnalysis.setSootClassPathJars(getSootClassPath());

//runDemoSet1(secucheckAnalysis, resultListener);
runDemoSet1(secucheckAnalysis, resultListener);
runDemoSet2(secucheckAnalysis, resultListener);
//runDemoSet3(secucheckAnalysis, resultListener);
//runDemoSet4(secucheckAnalysis, resultListener);
runDemoSet3(secucheckAnalysis, resultListener);

}

Expand Down Expand Up @@ -121,16 +120,10 @@ private static void runDemoSet2(SecucheckAnalysis secucheckAnalysis,
runAnalysisQuery(secucheckAnalysis, compositeOfTenth, 10, null);
}

private static void runDemoSet3(SecucheckAnalysis secucheckAnalysis,
AnalysisResultListener resultListener) throws Exception {

}

/** Demo-set X: TODO: Fix the number.
/** Demo-set 3:
* - Demonstrates multiple composites
* - Demonstrates the result listener
*/
private static void runDemoSet4(SecucheckAnalysis secucheckAnalysis,
private static void runDemoSet3(SecucheckAnalysis secucheckAnalysis,
AnalysisResultListener resultListener) throws Exception {

List<CompositeTaintFlowQueryImpl> compositeOfFirst = Utility.getInList(
Expand Down Expand Up @@ -290,11 +283,17 @@ private static String getSootClassPath() {

private static List<EntryPoint> getEntryPoints(){
List<EntryPoint> entryPoints = new ArrayList<EntryPoint>();

EntryPoint entryPoint = new EntryPoint();
entryPoint.setCanonicalClassName("AnalyzeMeLevel1");
entryPoint.setAllMethods(true);
entryPoints.add(entryPoint);

entryPoint = new EntryPoint();
entryPoint.setCanonicalClassName("AnalyzeMeLevel2");
entryPoint.setAllMethods(true);
entryPoints.add(entryPoint);

return entryPoints;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static MethodImpl getSanitizerMethod(String canonicalClassName) {
List<InputParameter> inputs = new ArrayList<InputParameter>();
inputs.add(input);

List<OutputParameter> outputs = null;
List<OutputParameter> outputs = new ArrayList<OutputParameter>();
ReturnValue returnValue = null;

MethodImpl method = new MethodImpl();
Expand All @@ -76,8 +76,8 @@ private static MethodImpl getPropogatorMethod(String canonicalClassName) {
List<InputParameter> inputs = new ArrayList<InputParameter>();
inputs.add(input);

List<OutputParameter> outputs = null;
ReturnValue returnValue = null;
List<OutputParameter> outputs = new ArrayList<OutputParameter>();
ReturnValue returnValue = new ReturnValue();

MethodImpl method = new MethodImpl();
method.setName("propogator");
Expand All @@ -95,7 +95,7 @@ private static MethodImpl getSinkMethod(String canonicalClassName) {
List<InputParameter> inputs = new ArrayList<InputParameter>();
inputs.add(input);

List<OutputParameter> outputs = null;
List<OutputParameter> outputs = new ArrayList<OutputParameter>();
ReturnValue returnValue = null;

MethodImpl method = new MethodImpl();
Expand All @@ -115,9 +115,9 @@ public static MethodImpl getUsageSourceParameMethod(String canonicalClassName,
ReturnValue returnValue = null;

// For the first input parameter.
InputParameter inputParam = new InputParameter();
inputParam.setNumber(0);
inputs.add(inputParam);
OutputParameter outputParam = new OutputParameter();
outputParam.setNumber(0);
outputs.add(outputParam);

MethodImpl method = new MethodImpl();
method.setName("getSecret");
Expand Down
Loading

0 comments on commit 02e8da8

Please sign in to comment.