
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
hard-bindings-loader
Advanced tools
hard-bindings-loaderA webpack loader for node addon modules that handles the recommended
require("bindings")("myaddon.node") pattern.
Very early, use at your own risk, but feedback welcome!
No options at the moment, always emits all .node files directly in the output
directory.
// webpack.config.js
module.exports = {
externals: [
// Don't try to pack referenced .node files
function(context, request, callback) {
if (/\.node$/.test(request)) {
return callback(null, `commonjs ${request}`);
}
return callback();
},
],
module: {
rules: [
// ...
// Rewrites and emits
{
test: /\.m?js$/,
loader: "hard-bindings-loader",
},
],
},
};
In theory this should also work well chained with 'node-loader' to bundle the binary into the JS bundle, but I haven't tried.
Recognizes require('bindings')('foo.node'), uses (roughly)
require('bindings')({ path: true, bindings: 'foo.node' }) to get the built
addon module, re-writes the require to require('./foo.node'), and emits the
referenced file at that relative path.
Should also handle require('bindings')({ bindings: 'foo.node', ... }),
including with path: true to just get the path, but that has even less testing
than the rest of this module.
No options are supported yet, in theory this should support most everything
file-loader does to control the .node file output.
FAQs
Webpack loader for node addons using 'bindings' module to load.
We found that hard-bindings-loader 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.