mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
clean up android query and tests
This commit is contained in:
@@ -1 +1 @@
|
||||
| TestTrue.xml:7:5:17:30 | debuggable=true | Warning: debuggable attribute enabled |
|
||||
| TestTrue.xml:7:5:17:30 | debuggable=true | The 'debuggable' attribute is enabled. |
|
||||
|
||||
@@ -1,2 +1,39 @@
|
||||
// No need for Java code since only testing XML files
|
||||
public class Test { }
|
||||
package com.example.myapp;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
public class Test extends FragmentActivity {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstance) {
|
||||
try {
|
||||
super.onCreate(savedInstance);
|
||||
final String fname = getIntent().getStringExtra("fname");
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
Class<Fragment> fClass = (Class<Fragment>) Class.forName(fname);
|
||||
ft.add(fClass.newInstance(), ""); // hasTaintFlow
|
||||
ft.add(0, Fragment.instantiate(this, fname), null); // hasTaintFlow
|
||||
ft.add(0, Fragment.instantiate(this, fname, null)); // hasTaintFlow
|
||||
ft.add(0, fClass, null, ""); // hasTaintFlow
|
||||
ft.add(0, fClass.newInstance(), ""); // hasTaintFlow
|
||||
ft.attach(fClass.newInstance()); // hasTaintFlow
|
||||
ft.replace(0, fClass, null); // hasTaintFlow
|
||||
ft.replace(0, fClass.newInstance()); // hasTaintFlow
|
||||
ft.replace(0, fClass, null, ""); // hasTaintFlow
|
||||
ft.replace(0, fClass.newInstance(), ""); // hasTaintFlow
|
||||
|
||||
ft.add(Fragment.class.newInstance(), ""); // Safe
|
||||
ft.attach(Fragment.class.newInstance()); // Safe
|
||||
ft.replace(0, Fragment.class.newInstance(), ""); // Safe
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.example.happybirthday">
|
||||
|
||||
<!-- Safe: 'debuggable' set to false -->
|
||||
<!-- Safe: 'android:debuggable' set to false -->
|
||||
<application
|
||||
android:debuggable="false"
|
||||
android:allowBackup="true"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.example.happybirthday">
|
||||
|
||||
<!-- Safe: 'debuggable' not set at all -->
|
||||
<!-- Safe: 'android:debuggable' not set at all -->
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.example.happybirthday">
|
||||
|
||||
<!-- Not Safe: 'debuggable' set to true -->
|
||||
<!-- Not Safe: 'android:debuggable' set to true -->
|
||||
<application
|
||||
android:debuggable="true"
|
||||
android:allowBackup="true"
|
||||
|
||||
Reference in New Issue
Block a user