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.
A tool for uploading file to cdn.
const cdnplz = require('cdnplz');
try{
new cdnplz({
tpl_suffix: 'jade', //the suffix of template file
tpl_path: 'app/view', //the root path of template file
static_path: '.', //the path of the static file
output_path: 'output/view/', //the output path of template file
file_encoding: 'utf8',
cdn_provider: 'yourCdnProvider',//the cdn provider provided by user
cdn_options: {//the options of the cdn provider
https: true
}
}).start();
}catch(e){
console.log(e);
}
const cdnProvider = require('yourCdnProvider');
module.exports = {
upload: function(filePath, options){
return cdnProvider.upload(filePath, options);
}
}
Cdn provider should return a object which has a upload
method, and this upload
method takes filePath
and options
as parameters, returns a Promise. The data resolved by the Promise must be a Object like this:
{
'./static/img/logo.png': 'https://p1.ssl.qhimg.com/t010a4bf91e826708df.png' ,
'./static/js/main.js': 'https://s0.ssl.qhimg.com/static/c870687eb082c330.js'
}
FAQs
A tool for CDN
The npm package cdnplz receives a total of 4 weekly downloads. As such, cdnplz popularity was classified as not popular.
We found that cdnplz 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.