Skip to content
Merged
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Breaking

- `allChecksFinished` RASP execution state action renamed to `fastChecksFinished`. On Android, it is triggered when the fast checks are completed, while the postponed checks may still run; on iOS, when all checks are completed
- `TalsecIosConfig.appBundleId` (string) replaced by `appBundleIds` (string[]), matching the iOS SDK
- Methods that resolved with a status string or a constant now resolve to `void`: `startFreeRASP`, `addToWhitelist`, `blockScreenCapture`, `blockScreenControl`, `startOngoingCallDetection`, `stopOngoingCallDetection`, `storeExternalId`, `removeExternalId`
- All methods now reject with `TalsecError` (`code`: `talsec-failure`, `unsupported-platform`, `configuration-exception`, `external-id-failure`, `malware-failure`) instead of native errors or plain strings
- `onInvalidCallback` no longer exported; use `abortApp` to terminate the app
- The `TalsecPlugin` interface of the native bridge is no longer exported; use the exported functions instead

### Capacitor

Expand All @@ -28,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Android package (namespace) of the plugin renamed from `com.aheaditec.freerasp` to `app.talsec.rasp.capacitor`, following the Android SDK's `app.talsec.rasp`
- On Android, `isScreenCaptureBlocked()` reports the protection state of the current activity
- On Android, freeRASP now starts in background mode (`TalsecMode.BACKGROUND`), so the initialization and synchronous checks no longer run on the main thread
- Threat and RASP execution state actions are typed as returning `void` instead of `any`

### Android

Expand Down
2 changes: 1 addition & 1 deletion dist/esm/api/listeners/raspExecutionState.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/api/listeners/raspExecutionState.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/api/listeners/threat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/api/listeners/threat.js.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions dist/esm/api/methods/capacitor.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
import type { RaspExecutionStateEventActions, TalsecConfig, ThreatEventActions } from '../../types/types';
export declare const startFreeRASP: (config: TalsecConfig, actions: ThreatEventActions, raspExecutionStateActions?: RaspExecutionStateEventActions) => Promise<{
started: boolean;
}>;
export declare const startFreeRASP: (config: TalsecConfig, actions: ThreatEventActions, raspExecutionStateActions?: RaspExecutionStateEventActions) => Promise<void>;
6 changes: 3 additions & 3 deletions dist/esm/api/methods/capacitor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/api/methods/capacitor.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/esm/api/methods/internal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Terminates the app. Used when the native channel reports an unexpected callback.
*/
export declare const onInvalidCallback: () => void;
8 changes: 8 additions & 0 deletions dist/esm/api/methods/internal.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/esm/api/methods/internal.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 25 additions & 8 deletions dist/esm/api/methods/native.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
export declare const addToWhitelist: (packageName: string) => Promise<boolean>;
export declare const blockScreenCapture: (enable: boolean) => Promise<boolean>;
/**
* Android only. Adds an app to the malware whitelist, so it isn't reported as malware.
*/
export declare const addToWhitelist: (packageName: string) => Promise<void>;
/**
* Blocks or unblocks screen capture of the app screen.
*/
export declare const blockScreenCapture: (enable: boolean) => Promise<void>;
/**
* Returns whether screen capture of the app screen is blocked.
*/
export declare const isScreenCaptureBlocked: () => Promise<boolean>;
/**
* Android only. Prevents accessibility services from reading or controlling
* the app screen.
*/
export declare const blockScreenControl: (enable: boolean) => Promise<boolean>;
export declare const blockScreenControl: (enable: boolean) => Promise<void>;
/**
* Android only. Returns whether screen control is blocked.
*/
Expand All @@ -25,12 +34,20 @@ export declare const isOverlayWindowsBlocked: () => Promise<boolean>;
* Android only. Starts the ongoing call (cellular and VoIP) detection.
* Call states are reported through the `ongoingCall` threat action.
*/
export declare const startOngoingCallDetection: () => Promise<boolean>;
export declare const startOngoingCallDetection: () => Promise<void>;
/**
* Android only. Stops the ongoing call detection.
*/
export declare const stopOngoingCallDetection: () => Promise<boolean>;
export declare const storeExternalId: (data: string) => Promise<boolean>;
export declare const removeExternalId: () => Promise<boolean>;
export declare const stopOngoingCallDetection: () => Promise<void>;
/**
* Stores an external ID, sent to the backend with the security logs.
*/
export declare const storeExternalId: (data: string) => Promise<void>;
/**
* Removes the stored external ID.
*/
export declare const removeExternalId: () => Promise<void>;
/**
* Android only. Returns the app icon of the given package as a base64-encoded PNG.
*/
export declare const getAppIcon: (packageName: string) => Promise<string>;
export declare const onInvalidCallback: () => void;
Loading