
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
rollup-plugin-resolve-url-objects
Advanced tools
Resolve and bundle the contents of a string in new URL().
Resolve and bundle the contents of a string in new URL().
npm i rollup-plugin-resolve-url-objects
rollup.config.js
import resolveObjects from "rollup-plugin-resolve-url-objects";
export default {
input: ["src/main.js"],
plugins: [resolveObjects()],
format: "esm", // other formats have not been tested yet
};
In your source:
// @rollup-plugin-resolve-url-objects
const url = new URL("./myWorkerScript.js", import.meta.url);
at this point you can do anything with the url really, like:
const worker = new Worker(url, {type: "module"});
or
const sharedWorker = new SharedWorker(url, {type: "module"});
The plugin looks for the first occurrence of new URL()
after @rollup-plugin-resolve-url-objects
. It then creates a new chunk from the string found inside the url. This chunk is generated similarly to how rollup handles dynamic imports for instance.
The url is resolved relatively to the file that contains it. So this will likely only work if your url has import.meta.url
set as second argument. The plugin will still resolve the url if this isn't the case. But since the location of the output is unknown this might fail when you try to run the bundled code.
FAQs
Resolve and bundle the contents of a string in new URL().
We found that rollup-plugin-resolve-url-objects 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 malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.