Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
static-cling
Advanced tools
#Static Cling This is a node.js module that allows you to spin up a static file server either from code or from the command line.
###Installing $ npm install static-cling
Don't forget to use the global flag (--g) if you want the command line option everywhere.
###At the command line $ static
Yeah, that's it. You have the option to pass in -p for port, otherwise it defaults to port 3000, -d for directory, if you want to specify a different directory than the one you are in, and lastly -f for the default html page, this defaults to index.html
###In Code Static Cling is available to be used as a module as well if you want to use node to host static files.
require('static-cling').cling();
If using the module you can override the defaults by providing a config object
//defaults
var config = {
root: '.',
port: 3000,
filename: 'index.html'
}
//overriding defaults
cling({ port: 3456, root : './other/', filename: 'test.html' });
FAQs
Static file server
The npm package static-cling receives a total of 3,277 weekly downloads. As such, static-cling popularity was classified as popular.
We found that static-cling 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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.