diff --git a/CHANGELOG.md b/CHANGELOG.md index 647ca01..d4c0849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,31 @@ 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). +## [5.3.0] - 2026-09-30 + +- Android SDK version: 19.3.1 +- iOS SDK version: 7.1.4 + +### React Native + +#### Changed + +- Android builds now request a license token from Talsec through the `app.talsec.plugin` Gradle plugin, applied by freeRASP automatically + +#### Fixed + +- Expo config plugin no longer fails when added to `app.json` without options + +### Android + +#### Changed + +- Changed Talsec integration from Maven dependency to the `app.talsec.plugin` Gradle plugin with `talsec { }` configuration block + +#### Fixed + +- Root detection related bugs causing false positives + ## [5.2.2] - 2026-09-29 - Android SDK version: 19.2.3 diff --git a/android/build.gradle b/android/build.gradle index 740a874..25a1422 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,6 +6,7 @@ buildscript { repositories { google() mavenCentral() + maven { url 'https://europe-west3-maven.pkg.dev/talsec-artifact-repository/plugin' } } dependencies { @@ -13,6 +14,8 @@ buildscript { // noinspection DifferentKotlinGradleVersion classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" + // TODO: set the real version once app.talsec.plugin with wrapper support is released + classpath 'app.talsec.plugin:talsec-security-plugin:1.1.0' } } @@ -23,6 +26,7 @@ def isNewArchitectureEnabled() { apply plugin: "com.android.library" apply plugin: "kotlin-android" apply plugin: 'kotlinx-serialization' +apply plugin: 'app.talsec.plugin' if (isNewArchitectureEnabled()) { apply plugin: "com.facebook.react" @@ -53,6 +57,8 @@ def getMaxVersion(name) { android { compileSdk getMaxVersion("compileSdk") + talsec { hostAppIdentity = true } + defaultConfig { minSdkVersion getIntegerDefault("minSdkVersion") targetSdkVersion getIntegerDefault("targetSdkVersion") @@ -105,7 +111,7 @@ dependencies { implementation "com.facebook.react:react-native:$react_native_version" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" - implementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:19.2.3" + implementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:19.3.1" } if (isNewArchitectureEnabled()) { diff --git a/package.json b/package.json index 58ede31..b61df6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "freerasp-react-native", - "version": "5.2.2", + "version": "5.3.0", "description": "React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.", "main": "lib/commonjs/index", "module": "lib/module/index", @@ -14,7 +14,7 @@ "prettier": "prettier \"**/*.{ts,js}\"", "prepack": "bob build && yarn build:plugin", "build": "bob build", - "test:plugin": "yarn build:plugin && node plugin/tests/iosSpm.test.js", + "test:plugin": "yarn build:plugin && node plugin/tests/iosSpm.test.js && node plugin/tests/pluginProps.test.js", "example": "yarn --cwd example", "bootstrap": "yarn example && yarn install && yarn example pods", "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build", diff --git a/plugin/build/index.d.ts b/plugin/build/index.d.ts index 078b0fa..b693706 100644 --- a/plugin/build/index.d.ts +++ b/plugin/build/index.d.ts @@ -1,4 +1,4 @@ import { type ConfigPlugin } from '@expo/config-plugins'; import { type PluginConfigType } from './pluginConfig'; -declare const _default: ConfigPlugin; +declare const _default: ConfigPlugin; export default _default; diff --git a/plugin/build/index.js b/plugin/build/index.js index fc6c8fd..4dd4a07 100644 --- a/plugin/build/index.js +++ b/plugin/build/index.js @@ -108,7 +108,7 @@ const withRnTalsecIos = (config, props) => { config = withFreeraspIosPodfile(config, { spmEnabled }); return config; }; -const withRnTalsecApp = (config, props) => { +const withRnTalsecApp = (config, props = {}) => { config = withBuildscriptDependency(config); config = withAndroidMinSdkVersion(config, props); config = withAndroidR8Version(config, props); diff --git a/plugin/src/index.ts b/plugin/src/index.ts index 438a59b..6a0f5ef 100644 --- a/plugin/src/index.ts +++ b/plugin/src/index.ts @@ -157,7 +157,10 @@ const withRnTalsecIos: ConfigPlugin = (config, props) => { return config; }; -const withRnTalsecApp: ConfigPlugin = (config, props) => { +const withRnTalsecApp: ConfigPlugin = ( + config, + props: PluginConfigType = {} +) => { config = withBuildscriptDependency(config); config = withAndroidMinSdkVersion(config, props); config = withAndroidR8Version(config, props); diff --git a/plugin/tests/pluginProps.test.js b/plugin/tests/pluginProps.test.js new file mode 100644 index 0000000..fb0fd21 --- /dev/null +++ b/plugin/tests/pluginProps.test.js @@ -0,0 +1,15 @@ +/* eslint-env node */ + +const assert = require('assert').strict; +const withRnTalsecApp = require('../build').default; + +const expoConfig = () => ({ name: 'example', slug: 'example' }); + +assert.doesNotThrow(() => withRnTalsecApp(expoConfig())); +assert.doesNotThrow(() => withRnTalsecApp(expoConfig(), undefined)); +assert.doesNotThrow(() => withRnTalsecApp(expoConfig(), {})); +assert.doesNotThrow(() => + withRnTalsecApp(expoConfig(), { android: { minSdkVersion: 26 } }) +); + +console.log('pluginProps tests passed');