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.
@esbuild-plugins/node-globals-polyfill
Advanced tools
@esbuild-plugins/node-globals-polyfill is an npm package that provides polyfills for Node.js global variables and modules, making it easier to use Node.js-specific code in environments like the browser where these globals are not natively available.
Buffer Polyfill
This feature provides a polyfill for the Node.js Buffer global, allowing you to use Buffer in environments where it is not natively available, such as the browser.
const { Buffer } = require('buffer');
const buf = Buffer.from('Hello, world!', 'utf-8');
console.log(buf.toString('hex'));
Process Polyfill
This feature provides a polyfill for the Node.js process global, enabling you to use process-related functionalities in non-Node.js environments.
const process = require('process');
console.log(`Current working directory: ${process.cwd()}`);
Global Polyfill
This feature provides a polyfill for the Node.js global object, allowing you to define and access global variables in environments where the global object is not natively available.
global.myGlobalVar = 'Hello, global!';
console.log(global.myGlobalVar);
node-libs-browser is a package that provides polyfills for Node.js core modules for use in the browser. It is similar to @esbuild-plugins/node-globals-polyfill in that it allows Node.js-specific code to run in the browser, but it focuses more on providing polyfills for core modules rather than global variables.
browserify is a tool that allows you to write Node.js-style modules that compile for use in the browser. It includes polyfills for Node.js core modules and globals, similar to @esbuild-plugins/node-globals-polyfill, but it also provides a complete module bundling solution.
webpack is a module bundler that can be configured to provide polyfills for Node.js globals and core modules. While it is a more comprehensive tool compared to @esbuild-plugins/node-globals-polyfill, it can achieve similar results through its configuration and plugins.
FAQs
Unknown package
The npm package @esbuild-plugins/node-globals-polyfill receives a total of 737,449 weekly downloads. As such, @esbuild-plugins/node-globals-polyfill popularity was classified as popular.
We found that @esbuild-plugins/node-globals-polyfill 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.