Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
redux-persist-sensitive-storage
Advanced tools
redux-persist storage engine for react-native-sensitive-info
Storage engine to use react-native-sensitive-info with redux-persist.
react-native-sensitive-info manages all data stored in Android Shared Preferences and iOS Keychain.
NOTE: Android Shared Preferences are not secure, but there is a branch of react-native-sensitive-info that uses the Android keystore instead of shared preferences. You can use that branch with redux-persist-sensitive-storage if you prefer.
You can install this package using either yarn
or npm
. You will also need to install and link react-native-sensitive-info.
Using Yarn:
yarn add redux-persist-sensitive-storage react-native-sensitive-info
react-native link react-native-sensitive-info
Using npm:
npm install --save redux-persist-sensitive-storage react-native-sensitive-info
react-native link react-native-sensitive-info
To use redux-persist-sensitive-storage, configure redux-persist according to its documentation.
Modify the persistStore
call as follows:
import createSensitiveStorage from "redux-persist-sensitive-storage";
// ...
persistStore(store, { storage: createSensitiveStorage(options) });
options
is optional and are used to configure the keychain service (iOS) and shared preferences name (Android) that react-native-sensitive-info uses. See the documentation for more information.
Here's a full example:
import { compose, applyMiddleware, createStore } from "redux";
import { persistStore, autoRehydrate } from "redux-persist";
import createSensitiveStorage from "redux-persist-sensitive-storage";
const store = createStore(
reducer,
compose(
applyMiddleware(...),
autoRehydrate()
)
);
persistStore(store, {
storage: createSensitiveStorage({
keychainService: "myKeychain",
sharedPreferencesName: "mySharedPrefs"
});
);
FAQs
redux-persist storage engine for react-native-sensitive-info
The npm package redux-persist-sensitive-storage receives a total of 8,512 weekly downloads. As such, redux-persist-sensitive-storage popularity was classified as popular.
We found that redux-persist-sensitive-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.