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.
It's pleasant to write CoffeeScript in snake case style, but module consumers are more than likely using plain JavaScript and expecting camel cased method names.
This module requires an environment supporting Proxies.
CoffeeScript
cough = require "cough"
fs = cough require "fs"
# this works
data = fs.read_file_sync "some-file.json"
# or maybe export something snake cased, wrapped with cough
module.exports = cough
some_method_here: -> # ...
another_method_here: -> # ...
JavaScript (importing the exported object above)
var theModule = require("coffee-script-file-above");
// these work
theModule.someMethodHere();
theModule.anotherMethodHere();
Alternately, you might use it in a constructor
class Something
constructor: ->
return cough @
instance_method_one: ->
Instances will respond to instance_method_one()
or instanceMethodOne()
.
FAQs
coffee_script is better in snake_case
The npm package cough receives a total of 4 weekly downloads. As such, cough popularity was classified as not popular.
We found that cough 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.