SecureStorage
Configure the React Native native secure-storage tools to read and mutate native secure-storage values under explicit key allow-lists.
Warning: Every tool in this suite is Critical because it can expose or mutate secrets. Keep the allow-list narrow and only enable this suite when you explicitly need secure-storage inspection or repair.
Register the Suite
await Ansight.initializeAndActivate(
Ansight.createOptionsBuilder()
.withRemoteTools({
secureStorage: {
appleService: "com.example.app",
preferencesName: "secure_debug",
allowedKeys: ["debug_token"],
allowedKeyPrefixes: ["debug."],
},
})
.withReadWriteToolAccess()
.build(),
);
Registration API
withRemoteTools({ secureStorage: ... }): configures native secure-storage options.remoteTools.secureStorage.appleService: iOS Keychain service.remoteTools.secureStorage.preferencesName: Android secure-storage preferences name.remoteTools.secureStorage.allowedKeys/allowedKeyPrefixes: restrict keys.- top-level
secureStorageis accepted as a compatibility alias.
Specific Concerns
- Values may contain credentials, tokens, or other secrets.
- Keep key allow-lists narrow.
secure.set_valueis write-scoped.secure.remove_keyis delete-scoped and requireswithAllToolAccess().
Tool Matrix
| Name | Id | Scope | Description | Security |
|---|---|---|---|---|
Get Secure Storage Value | secure.get_value | Read | Reads a secure-storage value. | Critical |
Set Secure Storage Value | secure.set_value | Write | Writes a secure-storage value. | Critical |
Remove Secure Storage Key | secure.remove_key | Delete | Deletes a secure-storage key. | Critical |
Tool Details
Use these tools only for explicit local debugging and repair workflows. Keep the key allow-list narrow.