-
Notifications
You must be signed in to change notification settings - Fork 626
Audit of classes in firebase app distribution to minimize user access #3196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Coverage ReportAffected SDKsNo changes between base commit (dd1c336) and head commit (78339c4f). Test Logs
NotesHTML coverage reports can be produced locally with Head commit (78339c4f) is created by Prow via merging commits: dd1c336 34702b3. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (78339c4f) is created by Prow via merging commits: dd1c336 34702b3. |
/retest |
@@ -27,7 +27,7 @@ | |||
* href="https://github.com/google/auto/tree/master/value">https://github.com/google/auto/tree/master/value</a> | |||
*/ | |||
@AutoValue | |||
public abstract class AppDistributionReleaseInternal { | |||
abstract class AppDistributionReleaseInternal { | |||
|
|||
@NonNull | |||
public static Builder builder() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make the property methods in this class package private. External classes shouldn't need to access this data object
...ase-app-distribution/src/main/java/com/google/firebase/app/distribution/UpdateAabClient.java
Show resolved
Hide resolved
...ase-app-distribution/src/main/java/com/google/firebase/app/distribution/UpdateApkClient.java
Show resolved
Hide resolved
...pp-distribution/src/main/java/com/google/firebase/app/distribution/SignInResultActivity.java
Outdated
Show resolved
Hide resolved
@@ -29,7 +29,7 @@ | |||
import java.util.zip.ZipEntry; | |||
import java.util.zip.ZipFile; | |||
|
|||
public final class ReleaseIdentificationUtils { | |||
final class ReleaseIdentificationUtils { | |||
private static final String TAG = "ReleaseIdentification"; | |||
private static final int BYTES_IN_LONG = 8; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the methods in this class should also be package-private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I thought since the class is package-private it was fine but its better to be consistent.
@@ -25,6 +25,8 @@ | |||
public class SignInResultActivity extends AppCompatActivity { | |||
private static final String TAG = "SignInResultActivity:"; | |||
|
|||
public SignInResultActivity() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? Seems like the class is public already, so the default constructor will be public too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a left over from trying to make it package-private will remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure even if the class is marked as public, the constructor won't be public unless it's also marked as such.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to know! thanks!
...ase-app-distribution/src/main/java/com/google/firebase/app/distribution/InstallActivity.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
/test smoke-tests |
Looking at the files generated by api.txt, I have a few questions about the visibility of some classes and methods: @mannyjimenez0810 do you know if we could reduce the visibility of any of the following?:
(It might be worth doing a search for "public" in the app distribution package to see if there are any others we missed) |
@rachaprince Great Question. FirebaseAppDistributionLifeCycleNotifier FirebaseAppDistributionFileProvider
I get this exception java.lang.RuntimeException: Unable to get provider com.google.firebase.app.distribution.FirebaseAppDistributionFileProvider: java.lang.IllegalAccessException: java.lang.Class<com.google.firebase.app.distribution.FirebaseAppDistributionFileProvider> is not accessible from java.lang.Class<android.app.AppComponentFactory> UpdateProgress.Builder Thanks for catching these. Will do a search for public in the package to see if theres other pieces I missed. |
No description provided.