
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
strip-sourcemaps
Advanced tools
Many meta-frameworks, such as Remix, incorporate both server-side and client-side code within a single file. Despite being organized into separate bundles, the resulting sourcemap still contains the original source code, which could potentially end up on the client-side.
This Command Line Interface (CLI) is designed to scan client-side sourcemaps and remove any server-side code references.
By default, it will remove ALL import
statements and the following named exports
: loader
and action
. However, you can customize these settings using the CLI options.
To use this script, execute the following command:
npx strip-sourcemaps [options]
-h, --help
: Display help information.-b, --build-path <path>
: Specify the path to the client build directory (default: ./public/build
).-o, --output <path>
: Specify the path to the directory where the stripped sourcemaps will be saved (default: none). This can be useful for verifying that the code is stripped correctly.-e, --exports <string>
(default: loader,action
): Define a comma-separated list of exports to strip.-i, --imports <string>
(default: *
): Define a comma-separated list of imports to strip (supports *
or an empty string).Feel free to customize the CLI options to suit your specific requirements.
FAQs
A CLI to strip server code from sourcemaps
We found that strip-sourcemaps 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.