Skip to content
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

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open

freeRASP 6.8.0 #137

wants to merge 47 commits into from

Conversation

yardexx
Copy link
Member

@yardexx yardexx commented Oct 1, 2024

freeRASP 6.8.0

Pre-release checklist

  • πŸš€ Dev/Release modes works
  • πŸ”„ Callbacks works
  • πŸ“ Logging works
    • sdkVersion is correct
    • sdkPlatform is correct
  • βœ… Tests are passing
  • πŸ“‹ Changelog updated
  • ➑️ pubspec.yaml version updated

Post-release checklist

  • 🐦 Release to pub.dev
  • πŸ“ GitHub release

Type of Changes

  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • βœ… Build configuration change
  • πŸ“ Documentation
  • πŸ—‘οΈ Chore

Description

New feature: Malware detection

@yardexx yardexx requested a review from tompsota October 1, 2024 14:06
Copy link
Member

@tompsota tompsota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run the example app, I cannot scroll the malware list and there is some overflow:
Screenshot 2024-10-07 at 15 36 04

Can you fix this?

### Android

#### Added
- Implement empty callbacks for malware detection
Copy link
Member

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,
Copy link
Member

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

Comment on lines +38 to +46
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))
}
Copy link
Member

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")
Copy link
Member

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'],
Copy link
Member

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

Suggested change
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"
Copy link
Member

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.

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants