Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
bundle-internals
Advanced tools
The webpack plugin that collects a debug information about your webpack bundle (e.g. bundled modules, input entry points, and output assets)
The webpack plugin that collects a debug information about your webpack bundle (e.g. bundled modules, input entry points, and output assets)
npm i bundle-internals
const BundleInternalsPlugin = require('bundle-internals');
config.plugins.push(new BundleInternalsPlugin());
Allow to dump a debug data to specified file (relative an output directory)
new BundleInternalsPlugin({
saveTo: 'debug.json'
});
One of the values:
all
- run plugin on watch and non-watch buildnon-watch
- run plugin only on non-watch buildwatch
- run plugin only on watch buildrunMode
is all
by default
new BundleInternalsPlugin({
watchModeOnly: true
});
const bundleInternalsPlugin = new BundleInternalsPlugin()
bundleInternalsPlugin.hooks.data.tap('my-plugin', payload => {
console.log(payload);
})
Data format described in types.d.ts
Some data fields contain only ids and need to denormalize/resolve. For example file
field in data.input.modules
contain the only id of the file and we need to resolve it from data.input.files
:
data.input.modules.forEach(module => {
module.file = data.input.files.find(file => module.file === file.path)
});
This plugin will be used in Webpack Runtime Analyzer V2 But for now, you can load debug data from your bundle to Jora Sandbox and make some interesting queries to it.
Jora Sandbox is a sandbox for the Jora query engine that allows you to query and aggregate any data from JSON.
For example...
Jora Query:
input.files.nodeModule
.group(<name>)
.({name: key, version: value.version.sort()})
.sort(<name>)
Result:
[
{ name: "@babel/polyfill", version: ["7.4.4"] },
{ name: "@babel/runtime", version: ["7.5.5"] },
{ name: "@firebase/app", version: ["0.1.10"] },
{ name: "@firebase/messaging", version: ["0.1.9"] },
{ name: "@firebase/util", version: ["0.1.10", "0.1.8"] },
{ name: "@sentry/browser", version: ["4.6.6"] },
// ...
]
Jora Query:
input.modules.sort(<reasons.size()>).reverse().id
Result:
[
"./node_modules/react/index.js",
"./node_modules/prop-types/index.js",
"./node_modules/react-redux/lib/index.js",
"./node_modules/lodash/get.js",
"./node_modules/@babel/polyfill/node_modules/core-js/modules/ _export.js",
"./node_modules/react-dom/index.js",
// ...
1.0.0 (02 August 2019)
FAQs
The webpack plugin that collects a debug information about your webpack bundle (e.g. bundled modules, input entry points, and output assets)
The npm package bundle-internals receives a total of 1 weekly downloads. As such, bundle-internals popularity was classified as not popular.
We found that bundle-internals 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.