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

Release/6.9.0 #149

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.9.0] - 2024-11-19
- Android SDK version: 13.0.0
- iOS SDK version: 6.6.3

### Flutter

#### Added
- New feature: ADB detection as a new callback for enhanced app security

### Android

#### Added
- ADB detection feature

## [6.8.0] - 2024-11-15
- Android SDK version: 12.0.0
- iOS SDK version: 6.6.3
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ Learn more about commercial features at [https://talsec.app](https://talsec.app)

Learn more about freemium freeRASP features at [GitHub main repository](https://github.com/talsec/Free-RASP-Community).

## :radioactive: freeMalwareDetection
**freeMalwareDetection** is a powerful feature designed to enhance the security of your Android application by quickly and efficiently scanning for malicious or suspicious applications (e.g. Android malware) based on various blacklists and security policies. It helps to detect apps with suspicious package names, hashes, or potentially dangerous permissions.

After the integration of freeRASP, make sure you visit the [freeMalwareDetection](https://github.com/talsec/freeMalwareDetection) repository to learn more about this feature!

# :book: Discover the Official freeRASP Documentation
Visit the [GitBook page](https://docs.talsec.app/freerasp) for comprehensive and up-to-date guides, tutorials, and technical documentation specifically for freeRASP. It serves as your go-to resource, offering everything from basic instructions to advanced tips and tricks to help you get the most out of the project.

Expand All @@ -54,12 +59,6 @@ For integrating freeRASP on the Flutter platform, be sure to follow all the step

Be sure to bookmark it and stay informed! :books: :sparkles:.

## :scroll: Reference to Legacy Documentation

If you have any suggestions for improvement or notice anything that could be clarified in the new GitBook documentation, please open an issue. Your feedback helps us maintain high-quality resources for all users.

For information on older integration methods, you can refer to the [freeRASP wiki](https://github.com/talsec/Free-RASP-Flutter/wiki), which includes comprehensive legacy details and guidance. Additionally, the old integration can be found when you checkout to a specific tag. Your input is invaluable in helping us improve our resources and provide even better support for your needs.

# :rocket: What's New and Changelog
Stay informed and make the most of freeRASP by checking out [What's New and Changelog](https://docs.talsec.app/freerasp/whats-new-and-changelog)! Here, you’ll discover the latest features, enhancements, and bug fixes we’ve implemented to improve your experience across all platforms, including Android, iOS, Flutter, React Native, Capacitor, and Cordova.

Expand All @@ -72,4 +71,4 @@ If you have any ideas for improvements, feel free to [raise an issue](https://gi
You can check out the project board [here](https://github.com/orgs/talsec/projects/2).

# :page_facing_up: License
This project is provided as freemium software, i.e. there is a fair usage policy that imposes some limitations on the free usage. The SDK software consists of open-source and binary parts, which is the property of Talsec. The open-source part is licensed under the MIT License - see the LICENSE file for details.
This project is provided as freemium software, i.e. there is a fair usage policy that imposes some limitations on the free usage. The SDK software consists of open-source and binary parts, which is the property of Talsec. The open-source part is licensed under the MIT License - see the LICENSE file for details.
6 changes: 5 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.20'
ext.talsec_version = '12.0.0'
ext.talsec_version = '13.0.0'
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -51,6 +51,10 @@ android {
minSdkVersion 23
consumerProguardFiles 'consumer-rules.pro'
}

lintOptions {
disable 'InvalidPackage'
}
}

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions android/src/main/kotlin/com/aheaditec/freerasp/Threat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ internal sealed class Threat(val value: Int) {
object SystemVPN : Threat(659382561)

object DevMode : Threat(45291047)

object ADBEnabled : Threat(379769839)
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ internal object PluginThreatHandler : ThreatDetected, DeviceState {
notify(Threat.DevMode)
}

override fun onADBEnabledDetected() {
notify(Threat.ADBEnabled)
}

override fun onMalwareDetected(suspiciousApps: List<SuspiciousAppInfo>) {
notify(suspiciousApps)
}
Expand Down
3 changes: 1 addition & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ android {
applicationId "com.aheaditec.freerasp_example"
// Talsec library needs higher version than default (16)
minSdkVersion 23
// TODO: Update to "flutter.targetSdkVersion" when sdk will be updated to >= 2.0
targetSdkVersion 31
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
id "org.jetbrains.kotlin.android" version "1.6.10" apply false
id "org.jetbrains.kotlin.android" version "1.7.20" apply false
}

include ":app"
1 change: 1 addition & 0 deletions example/lib/threat_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class ThreatNotifier extends AutoDisposeNotifier<ThreatState> {
_updateThreat(Threat.secureHardwareNotAvailable),
onSystemVPN: () => _updateThreat(Threat.systemVPN),
onDevMode: () => _updateThreat(Threat.devMode),
onADB: () => _updateThreat(Threat.adb),
);

Talsec.instance.attachListener(threatCallback);
Expand Down
9 changes: 9 additions & 0 deletions lib/src/enums/threat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ enum Threat {
///
/// Android only
devMode,

/// The application is running on a device that has active ADB
/// (Android Debug Bridge).
///
/// Android only
adb,
Copy link
Member

Choose a reason for hiding this comment

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

prosΓ­m pomenuj to adbEnabled

}

/// An extension on the [Threat] enum to provide additional functionality.
Expand Down Expand Up @@ -84,6 +90,7 @@ extension ThreatX on Threat {
/// * 1564314755 - secureHardwareNotAvailable
/// * 659382561 - systemVPN
/// * 45291047 - devMode
/// * 379769839 - adb
static Threat fromInt(int code) {
switch (code) {
case 1268968002:
Expand Down Expand Up @@ -112,6 +119,8 @@ extension ThreatX on Threat {
return Threat.systemVPN;
case 45291047:
return Threat.devMode;
case 379769839:
return Threat.adb;
default:
// Unknown data came from native code. This shouldn't normally happen.
exit(127);
Expand Down
2 changes: 2 additions & 0 deletions lib/src/talsec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ class Talsec {
callback.onSystemVPN?.call();
case Threat.devMode:
callback.onDevMode?.call();
case Threat.adb:
callback.onADB?.call();
}
});
}
Expand Down
4 changes: 4 additions & 0 deletions lib/src/threat_callback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ThreatCallback extends TalsecPigeonApi {
this.onSecureHardwareNotAvailable,
this.onSystemVPN,
this.onDevMode,
this.onADB,
this.onMalware,
});

Expand Down Expand Up @@ -83,6 +84,9 @@ class ThreatCallback extends TalsecPigeonApi {
/// This method is called whe the device has Developer mode enabled
final VoidCallback? onDevMode;

/// This method is called when the device has active ADB (Android Debug)
final VoidCallback? onADB;

@override
void onMalwareDetected(List<SuspiciousAppInfo> packageInfo) {
onMalware?.call(packageInfo);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: freerasp
description: Flutter library for improving app security and threat monitoring on Android and iOS mobile devices. Learn more about provided features on the freeRASP's homepage first.
version: 6.8.0
version: 6.9.0
homepage: https://www.talsec.app/freerasp-in-app-protection-security-talsec
repository: https://github.com/talsec/Free-RASP-Flutter

Expand Down
6 changes: 4 additions & 2 deletions test/src/enums/threat_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:freerasp/freerasp.dart';

void main() {
test('Threat enum should contain 13 values', () {
test('Threat enum should contain 14 values', () {
final threatValuesLength = Threat.values.length;

expect(threatValuesLength, 13);
expect(threatValuesLength, 14);
});

test('Threat enum should match its values index', () {
Expand All @@ -24,6 +24,7 @@ void main() {
expect(threatValues[10], Threat.secureHardwareNotAvailable);
expect(threatValues[11], Threat.systemVPN);
expect(threatValues[12], Threat.devMode);
expect(threatValues[13], Threat.adb);
});

test(
Expand All @@ -43,6 +44,7 @@ void main() {
expect(ThreatX.fromInt(1564314755), Threat.secureHardwareNotAvailable);
expect(ThreatX.fromInt(659382561), Threat.systemVPN);
expect(ThreatX.fromInt(45291047), Threat.devMode);
expect(ThreatX.fromInt(379769839), Threat.adb);
},
);
}
2 changes: 2 additions & 0 deletions test/test_utils/spy_threat_callback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class SpyThreatListener {
callback.onSystemVPN?.call();
case Threat.devMode:
callback.onDevMode?.call();
case Threat.adb:
callback.onADB?.call();
}
}
}