Connect Clawsmith to your coding agent. Ship products like crazy.Unlimited usage during betaGet API Key →
← Back to ideas
clawsmith.com/idea/strip-source-maps-and-secrets-from-npm-packages-before-publish
IdeaCompetitiveSECURITYCLIDEVTOOLLive

A pre-publish scanner that strips source maps, secrets, and internal code from npm packages before they ship to the registry

Anthropic accidentally shipped 512K lines of Claude Code source code via an npm source map file that was never meant to be public. This happens constantly because .npmignore and package.json files fields are easy to misconfigure. The repo got 100K+ stars in days as people reversed the entire codebase. This tool scans your npm package before publish, catches source maps, leaked environment variables, internal documentation, and accidentally included files, then blocks the publish until you fix it.

Demand Breakdown

GitHub
101,000
X
18,899
Reddit
6,500
HN
4,100

Gap Assessment

CompetitiveMultiple tools exist but differentiation opportunities remain

3 tools exist (npm-packlist, Socket.dev, Secretlint) but gaps remain: No content scanning, no secret detection, no source map analysis, just file listing; Post-publish only, no pre-publish prevention, no source map deep analysis, consumer-side not publisher-side.

Features4 agent-ready prompts

CLI that runs before npm publish, scans the package tarball for secrets (API keys, tokens, passwords), and blocks publish if found
Parser that detects embedded source maps, inline source content, and webpack devtool artifacts that would expose original source code
Pre-commit hook and CI action that runs the scanner automatically on every publish attempt and fails the pipeline on violations
Tool that scans your already-published npm packages on the registry and reports which versions contain leaked secrets or source maps

Competitive LandscapeFREE

ProductDoesMissing
npm-packlistLists files that npm pack would includeNo content scanning, no secret detection, no source map analysis, just file listing
Socket.devScans npm packages for supply chain attacks post-publishPost-publish only, no pre-publish prevention, no source map deep analysis, consumer-side not publisher-side
SecretlintScans files for hardcoded secrets using pattern matchingGeneral-purpose, not npm-publish-aware, no source map analysis, no package.json files field checking

Leads40BUILDER

@shoucccc
@gabrielanhaia
@varshithvhegde
@marc.bara.iniesta
@mgupta70
@kolkov
@Kuberwastaken
@instructkr
40 people already want this

Sign in to unlock full access.