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.
[0.5.0] - 2016-05-11
BREAKING: new API:
Functions on the top level were replaced with boolean values representing the state of the current browser:
sniffFns.isIE
//=> false
sniffFns.isChrome
//=> true
Simplified API: no more .browser
, no more sniff-fns/src
in require
:
- sniffFns.browser.isIE(navigator.userAgent)
+ sniffFns.isIE
- var isChrome = require('sniff-fns/src/is_browser_chrome')
- var isChrome = require('sniff-fns/is_chrome')
- isChrome(navigator.userAgent)
+ isChrome
To access functions that accepts a user agent string,
use lib
namespace:
- sniffFns.browser.isIE(request.ua)
+ sniffFns.lib.isIE(request.ua)
- var isIE = require('sniff-fns/src/is_ie_browser')
+ var isIE = require('sniff-fns/lib/is_ie')
isIE(request.ua)
isBb10
renamed to isBlackberry
whichOs
is now whichOS
Internal: new tests suite.
Internal: code refactoring.
iPad now is not detected as a Mac (isMac
).
Updated BlackBerry user agent string patterns.
FAQs
Browser agent sniffing functions
The npm package sniff-fns receives a total of 48 weekly downloads. As such, sniff-fns popularity was classified as not popular.
We found that sniff-fns demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.