Skip to content

Commit fb27d46

Browse files
authored
feat: add ios screenshot blocking, external id support (freeRASP 2.1.0) (#32)
* feat: add ios screenshot blocking, external id support * fix docs * chore: add condition for ios screen blocking
1 parent 4bf9bf5 commit fb27d46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1386
-798
lines changed

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2025-05-15
9+
10+
- iOS SDK version: 6.11.0
11+
- Android SDK version: 15.1.0
12+
13+
### Capacitor
14+
15+
#### Added
16+
17+
- Added interface for screenshot / screen recording blocking on iOS
18+
- Added interface for external ID storage
19+
20+
### Android
21+
22+
#### Added
23+
24+
- Added externalId to put an integrator-specified custom identifier into the logs.
25+
- Added eventId to the logs, which is unique per each log. It allows traceability of the same log across various systems.
26+
27+
#### Changed
28+
29+
- New root detection checks added
30+
31+
### iOS
32+
33+
#### Added
34+
35+
- Added externalId to put an integrator-specified custom identifier into the logs.
36+
- Added eventId to the logs, which is unique per each log. It allows traceability of the same log across various systems.
37+
- Screen capture protection obscuring app content in screenshots and screen recordings preventing unauthorized content capture. Refer to the freeRASP integration documentation.
38+
39+
#### Fixed
40+
41+
- Resolved an issue with the screen recording detection.
42+
- Resolved an issue that prevented Xcode tests from running correctly.
43+
844
## [2.0.0] - 2024-03-25
945

1046
- iOS SDK version: 6.9.0

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ dependencies {
7676
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
7777
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
7878

79-
implementation 'com.aheaditec.talsec.security:TalsecSecurity-Community-Capacitor:15.0.0'
79+
implementation 'com.aheaditec.talsec.security:TalsecSecurity-Community-Capacitor:15.1.0'
8080
}

android/src/main/java/com/aheaditec/freerasp/FreeraspPlugin.kt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,25 @@ class FreeraspPlugin : Plugin() {
207207
}
208208
}
209209

210+
@PluginMethod
211+
fun storeExternalId(call: PluginCall) {
212+
val externalId = call.getString("data")
213+
if (externalId.isNullOrEmpty()) {
214+
call.reject(
215+
"External ID not provided", "MissingArgumentError"
216+
)
217+
}
218+
try {
219+
Talsec.storeExternalId(context, externalId)
220+
call.resolve(JSObject().put("result", true))
221+
} catch (e: Exception) {
222+
call.reject(
223+
"Error during storeExternalId operation in freeRASP Native Plugin",
224+
"NativePluginError"
225+
)
226+
}
227+
}
228+
210229
internal fun notifyListeners(threat: Threat) {
211230
notifyListeners(THREAT_CHANNEL_NAME, JSObject().put(THREAT_CHANNEL_KEY, threat.value), true)
212231
}

dist/esm/definitions.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export interface FreeraspPlugin {
3030
isScreenCaptureBlocked(): Promise<{
3131
result: boolean;
3232
}>;
33+
storeExternalId(options: {
34+
data: string;
35+
}): Promise<{
36+
result: boolean;
37+
}>;
3338
}
3439
export type FreeraspConfig = {
3540
androidConfig?: AndroidConfig;

dist/esm/definitions.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ declare const addToWhitelist: (packageName: string) => Promise<boolean>;
77
declare const getAppIcon: (packageName: string) => Promise<string>;
88
declare const blockScreenCapture: (enable: boolean) => Promise<boolean>;
99
declare const isScreenCaptureBlocked: () => Promise<boolean>;
10+
declare const storeExternalId: (data: string) => Promise<boolean>;
1011
export * from './definitions';
11-
export { Freerasp, startFreeRASP, setThreatListeners, removeThreatListeners, addToWhitelist, getAppIcon, blockScreenCapture, isScreenCaptureBlocked, };
12+
export { Freerasp, startFreeRASP, setThreatListeners, removeThreatListeners, addToWhitelist, getAppIcon, blockScreenCapture, isScreenCaptureBlocked, storeExternalId, };

dist/esm/index.js

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)