
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
extended-define-webpack-plugin
Advanced tools
Extended version of webpack.DefinePlugin
npm install extended-define-webpack-plugin --save-dev
We want to inject a configuration object and use it in our code.
// app.config.js
module.exports = {
api_key: '1234567890ABCDEFG'
fb_conf: {
use_social: true,
api_key: '123456790'
}
};
We use the ExtendedDefinePlugin
in our webpack configuration like this:
// webpack.config.js
var ExtendedDefinePlugin = require('extended-define-webpack-plugin');
var appConfig = require('./app.config.js');
module.exports = {
// ...
plugins: [
/* ..., */
new ExtendedDefinePlugin({
APP_CONFIG: appConfig,
})
]
};
In our client code we can just use it!
// main.js
// ...
var server_api_key = APP_CONFIG.api_key;
// ...
if (APP_CONFIG.fb_conf.use_social) {
var fb_api_key = APP_CONFIG.fb_conf.api_key;
}
// ...
The example above will produce this output:
// main.js
// ...
var server_api_key = ('1234567890ABCDEFG');
// ...
if ((true)) {
var fb_api_key = ('123456790');
}
// ...
FAQs
Extended version of webpack.DefinePlugin
The npm package extended-define-webpack-plugin receives a total of 846 weekly downloads. As such, extended-define-webpack-plugin popularity was classified as not popular.
We found that extended-define-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.