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."],
},
})
.withAllToolAccess()
.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.
- All secure-storage tools use
critical, including reads, and requirewithAllToolAccess()because their values are secrets.
Tool Matrix
| Name | Id | Policy | Description |
|---|---|---|---|
Get Secure Storage Value | secure.get_value | Critical | Reads a secure-storage value. |
Set Secure Storage Value | secure.set_value | Critical | Writes a secure-storage value. |
Remove Secure Storage Key | secure.remove_key | Critical | Deletes a secure-storage key. |
Tool Details
Use these tools only for explicit local debugging and repair workflows. Keep the key allow-list narrow.