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.
Asynchronous synchronization in a cinch. Multi-target file uploading with rsync!
Asynchronous synchronization in a cinch. Multi-target file uploading with rsync!
Note: Cynch takes advantage of several ES6 features (classes, arrow functions, etc). You may need to run Node with Harmony flags (or upgrade to a newer version).
Certain IDEs (I won't name any) have pretty lame remote development support, especially if you have a need to sync with multiple remote environments. Cynch fixes that. Just specify your source and target(s) and you're ready to go.
npm install -g cynch
cynch /path/to/my/config.json
If no config file is provided, Cynch will look for cynch.json
in the current working directory.
The following are possible configuration values.
Name | Required? | Type | Description |
---|---|---|---|
source | x | string | Source directory to sync. May be relative to the configuration path. |
targets | x | string[] | Target objects (see below) |
exclusions | string[] | Patterns to exclude from the sync (equivalent to passing --exclude options to rsync) | |
inclusions | string[] | Patterns to include in the sync (equivalent to passing --include options to rsync) | |
rsyncOptions | string[] | Any additional options to pass to rsync | |
watch | boolean | Enable watch mode, watch for file changes and trigger sync | |
watchOptions | object | Watcher Options, See Chokidar | |
watchOptions.waitTimeout | int | Number of milliseconds to wait for all file change events to finish (default: 300) | |
watchOptions.path | string | Path to watch for changes (default: source from config file) | |
debug | boolean | Debug mode | |
growl | boolean | Allow Growl Notifications (default: true) |
Tip: rsync uses your machine's ssh config; you may substitute full user@host
strings with an entry from your ssh config. (e.g.: "host": "mybox"
)
{
"host": "somebody@somewhere.example.com",
"path": "/some/example/deployment/path"
}
{
"source": "~/src/myProject",
"targets": [
{
"host": "pinky",
"path": "/srv/myProject"
},
{
"host": "jewel",
"path": "/srv/myProject"
},
{
"host": "arvinne",
"path": "/srv/myProject"
}
],
"exclusions": [
".git",
".idea",
"node_modules/*"
]
}
If watch mode is enabled, Cynch will function as a long-running process that watches for file changes and synchronizes accordingly (as opposed to exiting immediately once the sync is complete). This can be used with any daemon tool (i.e. launchd, systemd) to ease deployment.
By default, your source
directory is watched. If this is not preferable, you may specify the watch directory via watchOptions.path
.
With growl notifications, you can not get notified when Cynch
succesffully uploads or errors out. In order for notifications to work you will need to install a notifier library.
Install growlnotify(1). On OS X 10.8, Notification Center is supported using terminal-notifier. To install:
$ sudo gem install terminal-notifier
Install notify-send through the libnotify-bin package:
$ sudo apt-get install libnotify-bin
Download and install Growl for Windows
Download growlnotify - IMPORTANT : Unpack growlnotify to a folder that is present in your path!
Cynch can be used on Windows using rsync from Cygwin, however there are some special requirements.
c:\src\myProject
); attempting to use them will result in error messages from rsync such as The source and destination cannot both be remote
. To fix this, use Cygwin-style paths (e.g. /cygdrive/c/src/myProject
). HOWEVER...watchOptions.path
config option must be set to the respective Windows-style path (e.g. c:\src\myProject
).##License ISC
FAQs
Asynchronous synchronization in a cinch. Multi-target file uploading with rsync!
We found that cynch 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.