Skip to content

Commit 190f437

Browse files
committed
Migrated the current codebase for FlowDroid 2.7 into the open source project
1 parent f6cb1ca commit 190f437

189 files changed

Lines changed: 21433 additions & 3281 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<android.content.SharedPreferences$Editor: android.content.SharedPreferences$Editor putBoolean(java.lang.String,boolean)> -> _SINK_
2+
<android.content.SharedPreferences$Editor: android.content.SharedPreferences$Editor putFloat(java.lang.String,float)> -> _SINK_
3+
<android.content.SharedPreferences$Editor: android.content.SharedPreferences$Editor putInt(java.lang.String,int)> -> _SINK_
4+
<android.content.SharedPreferences$Editor: android.content.SharedPreferences$Editor putLong(java.lang.String,long)> -> _SINK_
5+
<android.content.SharedPreferences$Editor: android.content.SharedPreferences$Editor putString(java.lang.String,java.lang.String)> -> _SINK_

soot-infoflow-android/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>de.tud.sse</groupId>
66
<artifactId>soot-infoflow-android</artifactId>
77
<name>soot-infoflow-android</name>
8-
<version>2.7-SNAPSHOT</version>
8+
<version>2.7</version>
99
<description>Android-specific components of FlowDroid</description>
1010
<properties>
1111
<maven.compiler.source>1.7</maven.compiler.source>
@@ -108,7 +108,7 @@
108108
<dependency>
109109
<groupId>ca.mcgill.sable</groupId>
110110
<artifactId>soot</artifactId>
111-
<version>3.1.0-SNAPSHOT</version>
111+
<version>3.2.0</version>
112112
</dependency>
113113
<dependency>
114114
<groupId>junit</groupId>

soot-infoflow-android/src/soot/jimple/infoflow/android/InfoflowAndroidConfiguration.java

Lines changed: 40 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public static class AnalysisFileConfiguration {
3232
/**
3333
* Copies the settings of the given configuration into this configuration object
3434
*
35-
* @param fileConfig
36-
* The other configuration object
35+
* @param fileConfig The other configuration object
3736
*/
3837
public void merge(AnalysisFileConfiguration fileConfig) {
3938
this.targetAPKFile = fileConfig.targetAPKFile;
@@ -67,9 +66,8 @@ public String getTargetAPKFile() {
6766
/**
6867
* Sets the target APK file on which the data flow analysis shall be conducted
6968
*
70-
* @param targetAPKFile
71-
* The target APK file on which the data flow analysis shall be
72-
* conducted
69+
* @param targetAPKFile The target APK file on which the data flow analysis
70+
* shall be conducted
7371
*/
7472
public void setTargetAPKFile(String targetAPKFile) {
7573
this.targetAPKFile = targetAPKFile;
@@ -87,8 +85,8 @@ public String getAndroidPlatformDir() {
8785
/**
8886
* Sets the directory in which the Android platform JARs are located
8987
*
90-
* @param androidPlatformDir
91-
* The directory in which the Android platform JARs are located
88+
* @param androidPlatformDir The directory in which the Android platform JARs
89+
* are located
9290
*/
9391
public void setAndroidPlatformDir(String androidPlatformDir) {
9492
this.androidPlatformDir = androidPlatformDir;
@@ -106,8 +104,7 @@ public String getSourceSinkFile() {
106104
/**
107105
* Sets the source and sink file
108106
*
109-
* @param sourceSinkFile
110-
* The source and sink file
107+
* @param sourceSinkFile The source and sink file
111108
*/
112109
public void setSourceSinkFile(String sourceSinkFile) {
113110
this.sourceSinkFile = sourceSinkFile;
@@ -150,9 +147,8 @@ public String getOutputFile() {
150147
* Sets the file into which the results of the data flow analysis shall be
151148
* written
152149
*
153-
* @param outputFile
154-
* The target file into which the results of the data flow analysis
155-
* shall be written
150+
* @param outputFile The target file into which the results of the data flow
151+
* analysis shall be written
156152
*/
157153
public void setOutputFile(String outputFile) {
158154
this.outputFile = outputFile;
@@ -224,8 +220,7 @@ public static class IccConfiguration {
224220
/**
225221
* Copies the settings of the given configuration into this configuration object
226222
*
227-
* @param iccConfig
228-
* The other configuration object
223+
* @param iccConfig The other configuration object
229224
*/
230225
public void merge(IccConfiguration iccConfig) {
231226
this.iccEnabled = iccConfig.iccEnabled;
@@ -325,8 +320,7 @@ public static class CallbackConfiguration {
325320
/**
326321
* Copies the settings of the given configuration into this configuration object
327322
*
328-
* @param iccConfig
329-
* The other configuration object
323+
* @param iccConfig The other configuration object
330324
*/
331325
public void merge(CallbackConfiguration cbConfig) {
332326
this.enableCallbacks = cbConfig.enableCallbacks;
@@ -340,8 +334,8 @@ public void merge(CallbackConfiguration cbConfig) {
340334
/**
341335
* Sets whether the taint analysis shall consider callbacks
342336
*
343-
* @param enableCallbacks
344-
* True if taints shall be tracked through callbacks, otherwise false
337+
* @param enableCallbacks True if taints shall be tracked through callbacks,
338+
* otherwise false
345339
*/
346340
public void setEnableCallbacks(boolean enableCallbacks) {
347341
this.enableCallbacks = enableCallbacks;
@@ -359,8 +353,7 @@ public boolean getEnableCallbacks() {
359353
/**
360354
* Sets the callback analyzer to be used in preparation for the taint analysis
361355
*
362-
* @param callbackAnalyzer
363-
* The callback analyzer to be used
356+
* @param callbackAnalyzer The callback analyzer to be used
364357
*/
365358
public void setCallbackAnalyzer(CallbackAnalyzer callbackAnalyzer) {
366359
this.callbackAnalyzer = callbackAnalyzer;
@@ -383,8 +376,8 @@ public CallbackAnalyzer getCallbackAnalyzer() {
383376
* will be missed. If it is enabled, context-insensitive callgraph algorithms
384377
* can lead to a high number of false positives for the callback analyzer.
385378
*
386-
* @param filterThreadCallbacks
387-
* True to discover callbacks registered in threads, otherwise false
379+
* @param filterThreadCallbacks True to discover callbacks registered in
380+
* threads, otherwise false
388381
*/
389382
public void setFilterThreadCallbacks(boolean filterThreadCallbacks) {
390383
this.filterThreadCallbacks = filterThreadCallbacks;
@@ -420,8 +413,7 @@ public int getMaxCallbacksPerComponent() {
420413
* will assume that precision has degraded too much and will analyze this
421414
* component without callbacks.
422415
*
423-
* @param maxCallbacksPerComponent
424-
* The maximum number of callbacks per component
416+
* @param maxCallbacksPerComponent The maximum number of callbacks per component
425417
*/
426418
public void setMaxCallbacksPerComponent(int maxCallbacksPerComponent) {
427419
this.maxCallbacksPerComponent = maxCallbacksPerComponent;
@@ -443,8 +435,7 @@ public int getCallbackAnalysisTimeout() {
443435
* stopped. After the timeout, the data flow analysis will continue with those
444436
* callbacks that have been found so far.
445437
*
446-
* @param callbackAnalysisTimeout
447-
* The callback analysis timeout in seconds
438+
* @param callbackAnalysisTimeout The callback analysis timeout in seconds
448439
*/
449440
public void setCallbackAnalysisTimeout(int callbackAnalysisTimeout) {
450441
this.callbackAnalysisTimeout = callbackAnalysisTimeout;
@@ -467,9 +458,8 @@ public int getMaxAnalysisCallbackDepth() {
467458
* chains of callbacks registering other callbacks. A value equal to or smaller
468459
* than zero indicates an infinite maximum depth.
469460
*
470-
* @param maxCallbackAnalysisDepth
471-
* The maximum depth up to which to look into callback registration
472-
* chains.
461+
* @param maxCallbackAnalysisDepth The maximum depth up to which to look into
462+
* callback registration chains.
473463
*/
474464
public void setMaxAnalysisCallbackDepth(int maxCallbackAnalysisDepth) {
475465
this.maxCallbackAnalysisDepth = maxCallbackAnalysisDepth;
@@ -576,8 +566,7 @@ public static class SourceSinkConfiguration {
576566
/**
577567
* Copies the settings of the given configuration into this configuration object
578568
*
579-
* @param iccConfig
580-
* The other configuration object
569+
* @param iccConfig The other configuration object
581570
*/
582571
public void merge(SourceSinkConfiguration ssConfig) {
583572
this.callbackSourceMode = ssConfig.callbackSourceMode;
@@ -595,9 +584,8 @@ public void merge(SourceSinkConfiguration ssConfig) {
595584
* Sets under which circumstances the parameters of callback methods shall be
596585
* treated as sources.
597586
*
598-
* @param callbackSourceMode
599-
* The strategy for deciding whether a certain callback parameter is
600-
* a data flow source or not
587+
* @param callbackSourceMode The strategy for deciding whether a certain
588+
* callback parameter is a data flow source or not
601589
*/
602590
public void setCallbackSourceMode(CallbackSourceMode callbackSourceMode) {
603591
this.callbackSourceMode = callbackSourceMode;
@@ -618,9 +606,8 @@ public CallbackSourceMode getCallbackSourceMode() {
618606
* Sets whether the parameters of lifecycle methods shall be considered as
619607
* sources
620608
*
621-
* @param enableLifecycleSoures
622-
* True if the parameters of lifecycle methods shall be considered as
623-
* sources, otherwise false
609+
* @param enableLifecycleSoures True if the parameters of lifecycle methods
610+
* shall be considered as sources, otherwise false
624611
*/
625612
public void setEnableLifecycleSources(boolean enableLifecycleSources) {
626613
this.enableLifecycleSources = enableLifecycleSources;
@@ -641,8 +628,7 @@ public boolean getEnableLifecycleSources() {
641628
* Sets the mode to be used when deciding whether a UI control is a source or
642629
* not
643630
*
644-
* @param mode
645-
* The mode to be used for classifying UI controls as sources
631+
* @param mode The mode to be used for classifying UI controls as sources
646632
*/
647633
public void setLayoutMatchingMode(LayoutMatchingMode mode) {
648634
this.layoutMatchingMode = mode;
@@ -673,9 +659,8 @@ public SourceSinkFilterMode getSourceFilterMode() {
673659
* Sets the default mode for handling sources that have not been configured
674660
* explicitly
675661
*
676-
* @param sourceFilterMode
677-
* The default mode for handling sources that have not been
678-
* configured explicitly
662+
* @param sourceFilterMode The default mode for handling sources that have not
663+
* been configured explicitly
679664
*/
680665
public void setSourceFilterMode(SourceSinkFilterMode sourceFilterMode) {
681666
this.sourceFilterMode = sourceFilterMode;
@@ -696,9 +681,8 @@ public SourceSinkFilterMode getSinkFilterMode() {
696681
* Sets the default mode for handling sinks that have not been configured
697682
* explicitly
698683
*
699-
* @param sourceFilterMode
700-
* The default mode for handling sinks that have not been configured
701-
* explicitly
684+
* @param sourceFilterMode The default mode for handling sinks that have not
685+
* been configured explicitly
702686
*/
703687
public void setSinkFilterMode(SourceSinkFilterMode sinkFilterMode) {
704688
this.sinkFilterMode = sinkFilterMode;
@@ -749,11 +733,9 @@ public Map<CategoryDefinition, CategoryMode> getSinkCategoriesAndModes() {
749733
/**
750734
* Adds a source category definition to this configuration
751735
*
752-
* @param category
753-
* The category definition
754-
* @param mode
755-
* The mode that defines whether this category shall be included or
756-
* excluded
736+
* @param category The category definition
737+
* @param mode The mode that defines whether this category shall be included
738+
* or excluded
757739
*/
758740
public void addSourceCategory(CategoryDefinition category, CategoryMode mode) {
759741
this.sourceCategories.put(category, mode);
@@ -762,11 +744,9 @@ public void addSourceCategory(CategoryDefinition category, CategoryMode mode) {
762744
/**
763745
* Adds a sink category definition to this configuration
764746
*
765-
* @param category
766-
* The category definition
767-
* @param mode
768-
* The mode that defines whether this category shall be included or
769-
* excluded
747+
* @param category The category definition
748+
* @param mode The mode that defines whether this category shall be included
749+
* or excluded
770750
*/
771751
public void addSinkCategory(CategoryDefinition category, CategoryMode mode) {
772752
this.sinkCategories.put(category, mode);
@@ -995,9 +975,8 @@ public AnalysisFileConfiguration getAnalysisFileConfig() {
995975
* Sets whether FlowDroid shall analyze one component at a time instead of
996976
* generating one big dummy main method containing all components
997977
*
998-
* @param oneComponentAtATime
999-
* True if FlowDroid shall analyze one component at a time, otherwise
1000-
* false
978+
* @param oneComponentAtATime True if FlowDroid shall analyze one component at a
979+
* time, otherwise false
1001980
*/
1002981
public void setOneComponentAtATime(boolean oneComponentAtATime) {
1003982
this.oneComponentAtATime = oneComponentAtATime;
@@ -1019,8 +998,7 @@ public boolean getOneComponentAtATime() {
1019998
* FlowDroid can either set up Soot on its own, or work with an existing
1020999
* instance.
10211000
*
1022-
* @param sootIntegrationMode
1023-
* The integration mode that FlowDroid shall use
1001+
* @param sootIntegrationMode The integration mode that FlowDroid shall use
10241002
*/
10251003
public void setSootIntegrationMode(SootIntegrationMode sootIntegrationMode) {
10261004
this.sootIntegrationMode = sootIntegrationMode;
@@ -1052,9 +1030,8 @@ public boolean getMergeDexFiles() {
10521030
* Sets whether FlowDroid shall merge all dex files in the APK to get a full
10531031
* picture of the app
10541032
*
1055-
* @param mergeDexFiles
1056-
* True if FlowDroid shall merge all dex files in the APK, otherwise
1057-
* false
1033+
* @param mergeDexFiles True if FlowDroid shall merge all dex files in the APK,
1034+
* otherwise false
10581035
*/
10591036
public void setMergeDexFiles(boolean mergeDexFiles) {
10601037
this.mergeDexFiles = mergeDexFiles;

0 commit comments

Comments
 (0)