-
Notifications
You must be signed in to change notification settings - Fork 18
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
freeRASP 6.8.0 #137
base: master
Are you sure you want to change the base?
freeRASP 6.8.0 #137
Conversation
# Conflicts: # android/build.gradle
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.
### Android | ||
|
||
#### Added | ||
- Implement empty callbacks for malware detection |
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.
Can you announce it as a new feature?
private fun PackageInfo.toPigeon(context: Context): FlutterPackageInfo { | ||
return FlutterPackageInfo( | ||
packageName = packageName, | ||
appName = applicationInfo?.name, |
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.
applicationInfo?.name returns just package name-style string, to get the app name, we have to use something like this: https://github.com/talsec/Free-RASP-ReactNative/blob/release-3.10.0/android/src/main/java/com/freeraspreactnative/utils/Utils.kt#L26
val blocklistedPermissions = mutableListOf<Array<String>>() | ||
if (androidConfig.has("blocklistedPermissions")) { | ||
val permissions = androidConfig.getJSONArray("blocklistedPermissions") | ||
for (i in 0 until permissions.length()) { | ||
val permission = permissions.getJSONArray(i) | ||
val permissionList = mutableListOf<String>() | ||
for (j in 0 until permission.length()) { | ||
permissionList.add(permission.getString(j)) | ||
} |
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.
Can you make it an extension method?
if (packageName != null) { | ||
Talsec.addToWhitelist(it, packageName) | ||
} | ||
} ?: throw IllegalStateException("Unable to add package to whitelist - context is null") |
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.
Is the code after ?: ever reachable? runResultCatching returns Unit, so it is never null. Correct me if I'm wrong. Also when context is null it won't throw
androidConfig: AndroidConfig( | ||
packageName: 'com.aheaditec.freeraspExample', | ||
signingCertHashes: ['AKoRuyLMM91E7lX/Zqp3u4jMmd0A7hH/Iqozu0TMVd0='], | ||
supportedStores: ['com.sec.android.app.samsungapps'], | ||
blocklistedPackageNames: ['com.aheaditec.freeraspExample'], |
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 it would be nicer to have the malware config separated from other fields
blocklistedPackageNames: ['com.aheaditec.freeraspExample'], | |
malware: MalwareConfig( | |
blocklistedPackageNames: ['com.aheaditec.freeraspExample'], | |
), |
@@ -4,7 +4,7 @@ description: Demonstrates how to use the freerasp plugin. | |||
publish_to: 'none' | |||
|
|||
environment: | |||
sdk: ">=2.12.0 <4.0.0" | |||
sdk: ">=3.0.0 <4.0.0" |
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 need even higher one
Because freerasp depends on pigeon >=19.0.0 which requires SDK version >=3.2.0 <4.0.0, version solving failed.
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.
Also version of gradle should be upgraded in settings.gradle, I wasn't able to build the project with current settings
freeRASP 6.8.0
Pre-release checklist
pubspec.yaml
version updatedPost-release checklist
Type of Changes
Description
New feature: Malware detection