Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
simple-watcher
Advanced tools
A simple recursive directory watcher.
I know there's plenty of them out there, but most don't seem to care about the recursive
option of Node's fs.watch()
, which significantly improves performance on the supported platforms, especially for large directories.
Features:
recursive
options on OS X and Windows; uses a fallback for other platforms.ReadDirectoryChangesW
double reporting.Usage:
simple-watcher path1 [path2 path3 ...] [--shallow]
const watch = require('simple-watcher')
// Watch over file or directory:
watch('/path/to/foo', filePath => {
console.log(`Changed: ${filePath}`)
})
// Watch over multiple paths:
watch(['/path/to/foo', '/path/to/bar'], filePath => {
console.log(`Changed: ${filePath}`)
})
// Shallow watch:
watch(['/path/to/foo', '/path/to/bar'], { shallow: true }, filePath => {
console.log(`Changed: ${filePath}`)
})
When watching over files rather than directories, the fs.watchFile()
is used. This is to provide a polling fallback in cases where directory watching is problematic (e.g. Docker).
FAQs
"A simple file s watcher."
The npm package simple-watcher receives a total of 54,458 weekly downloads. As such, simple-watcher popularity was classified as popular.
We found that simple-watcher 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.