LibraryintheMiddleJS is a lightweight security and observability shim for JavaScript. It acts as a Code Firewall, sitting between your application and third-party or legacy dependencies.
By wrapping a library in litm.js, you can enforce whitelists, block dangerous methods, and monitor library behavior in real-time without modifying the source code of the dependency.
- Harden Legacy Code: Whitelist only the safe functions of an antiquated library.
- Zero Trust Dependencies: Ensure a library can't call unauthorized internal methods or
eval. - Virtual Patching: Block access to a vulnerable method until a patch is released.
- Shadow IT Detection: Use Transparent Mode to audit what your dependencies are actually doing.
Download litm.js and include it in your project:
const LibraryInTheMiddle = require('./litm');