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.
@firebase/remote-config
Advanced tools
The @firebase/remote-config package is part of the Firebase platform and provides tools to configure and customize the behavior and appearance of your app without needing to publish an app update. It allows developers to define parameters in the Firebase Console and use them in their app to modify app behavior for different users.
Fetch and activate values
This feature allows developers to fetch remote configuration parameters and activate them in the app. The code sample demonstrates fetching and activating remote config values, then retrieving a specific parameter as a string.
const { getRemoteConfig, fetchAndActivate } = require('@firebase/remote-config');
async function fetchConfig() {
const remoteConfig = getRemoteConfig();
await fetchAndActivate(remoteConfig);
const value = remoteConfig.getString('welcome_message');
console.log('Welcome message:', value);
}
Set default values
This feature enables setting default values for configuration parameters within the app code. The code sample shows how to set a default value for a 'welcome_message' parameter, which will be used if no value is fetched from the server or while waiting for updated values.
const { getRemoteConfig, setDefaults } = require('@firebase/remote-config');
function setDefaultConfig() {
const remoteConfig = getRemoteConfig();
setDefaults(remoteConfig, {
'welcome_message': 'Hello, default!'
});
}
The 'config' package is used for managing configuration settings for Node.js applications. It does not support remote configuration management but is useful for organizing configuration settings within an application. Unlike @firebase/remote-config, it does not allow for dynamic updates from a remote server.
The 'dotenv' package is used to load environment variables from a .env file into process.env, providing a simple way to configure application settings. It differs from @firebase/remote-config as it does not support fetching configurations remotely or updating them without redeploying the application.
This is the Remote Config component of the Firebase JS SDK.
This package is not intended for direct usage, and should only be used via the officially supported firebase package.
Setup:
yarn
in repo rootFormat:
yarn prettier
in RC packageUnit test:
yarn test
in RC packageEnd-to-end test:
yarn build
in RC packageyarn build
in Firebase packageFAQs
The Remote Config package of the Firebase JS SDK
The npm package @firebase/remote-config receives a total of 1,848,037 weekly downloads. As such, @firebase/remote-config popularity was classified as popular.
We found that @firebase/remote-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.